Ignore:
Timestamp:
09/11/09 15:30:40 (3 years ago)
Author:
james
Message:

fix %REPEAT to be a lot less broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/output_REPEAT.tcl

    r1019 r1034  
    1717        if {[regexp -nocase "%REPEAT\{(.+?)\}" $line matches BOOM]} { 
    1818                set replacement [bMotionMakeRepeat $BOOM] 
    19                 regsub -nocase "%REPEAT\\{$BOOM\\}" $line $replacement line 
     19                putlog "replacement is $replacement" 
     20                set location [string first $matches $line] 
     21                if {$location == -1} { 
     22                        # something's broken 
     23                        return "" 
     24                } 
     25                putlog "location is $location" 
     26                putlog "matches is $matches" 
     27                set line [string replace $line $location [expr $location + [string length $matches] - 1] $replacement] 
     28                putlog "line is now $line" 
    2029        } 
    2130        return $line 
Note: See TracChangeset for help on using the changeset viewer.