the bigg Posted February 17, 2007 Share Posted February 17, 2007 You can have variables containing exclusively whitespace. While this is generally a bad idea, it can be used for better readability in REPLACE_TEXTUALLY lines: BEGIN ~asd~ <<<<<<<< asd Something() Something Else() >>>>>>>> INCLUDE ~bg2fixpack/lib/extra_regexp_vars.tph~ COPY ~asd~ ~foo~ SPRINT ~ ~ ~[%tab% %wnl%%lnl%%mnl%]+~ SPRINT ~ ~ ~[%tab% ]+~ REPLACE_TEXTUALLY ~Something()% %Something% %Else()~ ~Something() SomethingEntirelyDifferent()~ will work as intended if all the file is encoded with the same newline notation, but perhaps is more readable than putting hundreds of [%tab% %wnl%%lnl%%mnl%]+ in the code you may have to define the %space*m newline space*n% variable multiple times with a different number of spaces before and after the newline (before the NL just in case somebody puts a trailing space for error), to account for different indentation level, but that shouldn't be a problem. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.