on Tuesday, 17 June 2003, Marck wrote
MDP>>> Carsten Thonges has published a version of this macro on this
MDP>>> list that only re-wraps long lines. It would retain such
MDP>>> formatting.
MDP> The template I was thinking of is this:
MDP> ====[QT ct_quotes]====
MDP> %REM=' ct_quotes - another %QUOTES macro replacement
MDP> wraps only "long" lines
MDP> written by Carsten Thoenges, August 2002
MDP> '%-
MDP> %IF:+%-
MDP> %-%REM=_Recursion?_%-
MDP> %-%SETPATTREGEXP=&\A(ct7u58m4p2TOH)&%-
MDP> %-%REGEXPMATCH=&%COMMENT&+<>+ct7u58m4p2TOH+%-
MDP> :+%-
MDP> %-%COMMENT=&ct7u58m4p2TOH%QUOTES&%QINCLUDE=&cw_r&+%-
MDP> :+%-
MDP> %-%IF:"%-
MDP> %-%-%SETPATTREGEXP='(?is)\Act7u58m4p2TOH.*?\n(.*)'%-
MDP> %-%-%REGEXPMATCH='%COMMENT'"<>"":"%-
MDP> %-%-
MDP> %-%-%IF:#%-
MDP> %-%-%-%REM=_80 characters or more?_%-
MDP> %-%-%-%SETPATTREGEXP=_(?is)\Act7u58m4p2TOH([^\n]{80}.*?)\n_%-
MDP> %-%-%-%REGEXPMATCH=_%COMMENT_#<>##:#%-
MDP> %-%-%-
MDP> %-%-%-%REM=_Wrap this long line_%-
MDP> %-%-%-%WRAPPED=�%-
MDP> %-%-%-%-%SETPATTREGEXP=~(?is)\Act7u58m4p2TOH(.*?)\n~%-
MDP> %-%-%-%-%REGEXPMATCH=~%COMMENT~�%-
MDP> %-%-#:#%-
MDP> %-%-%-%REM=_No need to wrap_%-
MDP> %-%-%-%SETPATTREGEXP=~(?is)\Act7u58m4p2TOH(.*?)\n~%-
MDP> %-%-%-%REGEXPMATCH=~%COMMENT~#
MDP> %-%-
MDP> %-%-%COMMENT='ct7u58m4p2TOH%-
MDP> %-%-%-%SETPATTREGEXP=_(?is).*?\n(.*)_%-
MDP> %-%-%-%REGEXPMATCH=_%COMMENT_'%-
MDP> %-%-%QINCLUDE='ct_quotes'":"%-
MDP> %-%-
MDP> %-%-%SETPATTREGEXP='\Act7u58m4p2TOH(.*)'%-
MDP> %-%-%REGEXPMATCH='%COMMENT'%-
MDP> %-%-%COMMENT=''"%-
MDP> +%-
MDP> ====[End]====
MDP> This will wrap long lines, but only long lines. It doesn't deal with
MDP> short lines at all so a paragraph of long-ish lines will end up
MDP> "limping" (a full length line followed by a short line followed by a
MDP> full length line followed by a short line ... etc.).
ok, can you help a bit more please. I made a QT of the above called
qt_quotes, then i put it in the following QT called 'driver'
%Comment="%QInclude='quote_cleanup'"%-
%QInclude="qt_quotes"%-
%Comment=""%-
which is called by this in the reply template
%QINCLUDE="driver"
and it didn't work at all, nothing got quoted. so i think i must have
done something silly. how i can i make this long-line re-wrapper work
on the output of the Quote_cleanup QT ?
--
cheers,
charlie
Using The Bat! v1.62r on Windows 98
4.10 Build 2222
A
________________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html