Ignore:
Timestamp:
08/23/09 19:22:05 (3 years ago)
Author:
james
Message:

New output parser for core plugins - should fix problems with late replacements getting missed

File:
1 edited

Legend:

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

    r1016 r1019  
    1 # 
    2 # 
    31# vim: fdm=indent fdn=1 
    42# 
     
    64############################################################################### 
    75# This is a bMotion plugin 
    8 # Copyright (C) James Michael Seward 2000-2008 
     6# Copyright (C) James Michael Seward 2000-2009 
    97# 
    108# This program is covered by the GPL, please refer the to LICENCE file in the 
     
    3230        regsub {%VAR\{([^\}]+)\}\{strip\}} $line "%VAR{\\1:strip}" line 
    3331 
    34         set lastloop "" 
    35  
    36         while {[regexp -nocase {(%VAR\{([^\}:]+)(:[^\}]+)?\}(\{strip\})?)} $line matches whole_thing abstract options clean]} { 
     32        if {[regexp -nocase {(%VAR\{([^\}:]+)(:[^\}]+)?\}(\{strip\})?)} $line matches whole_thing abstract options clean]} { 
    3733                global $abstract 
    3834                #see if we have a new-style abstract available 
     
    126122                        set line [bMotionInsertString $line "%noun" "%VAR{sillyThings}"] 
    127123                } 
    128  
    129                 if {$lastloop == $line} { 
    130                         putlog "bMotion: ALERT! looping too much in %VAR code with $line (no change since last parse)" 
    131                         set line "/has a tremendous error while trying to sort something out :(" 
    132                         break 
    133                 } 
    134                 set lastloop $line 
    135124        } 
    136125 
Note: See TracChangeset for help on using the changeset viewer.