Ignore:
Timestamp:
Dec 12, 2005, 9:26:20 PM (19 years ago)
Author:
mmc
Message:

Fixed Rappture::Units::convert to work properly for both "/cm3"
and "cm" types of units. My last fix broke the "cm" case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/units.tcl

    r146 r148  
    450450    }
    451451    # note: case-insensitive matching for metric prefix
    452     if {[regexp {^(/?)([cCmMuUnNpPfFaAkKgGtT]?)([a-zA-Z].+)$} $units match slash prefix tail]} {
     452    if {[regexp {^(/?)([cCmMuUnNpPfFaAkKgGtT]?)([a-zA-Z]+[0-9]+|[a-zA-Z]+)$} $units match slash prefix tail]} {
    453453        if {[regexp {^[CUNFAK]$} $prefix]} {
    454454            # we know that these should be lower case
Note: See TracChangeset for help on using the changeset viewer.