Hello Peter,

As the 13:36 GMT +0200 on Thursday, September 4, 2003 deadline loomed,
Peter Fjelsten [PF] madly pounded out:

J>> Note the bq template as written above is not tested, but it should
J>> work.

PF> Hmm, it doesn't here.

Ok, well I tweaked my modification of the boxquote QT, and I have it
working as well as we can get at the moment.  It seems TB is smart
enough to recognize that a line with a quote prefix is in a different
paragraph than a line without one, even if they are not separated by a
blank line.

So short of writing a macro plugin or making some rather complicated
recursive wrapping template system, I give you:

=====[Begin bqa QT]=====
%REM=' bqa - Modified "Paste as Boxquote"
            original written by Carsten Thoenges, December 2002
            June 2003 - use new features of v1.63 beta 9
            Last modified: 2003-09-05
'%-
%_bqTopAndTail="-----"%-
%_bqTopCorner=","%-
%_bqBottomCorner="`"%-
%_bqSide="| "%-
%_bqTitleFormat=" [ %CURSOR ]"%-
%-
%If:+%_bqFirstTime+=++:+%-
%___%_bqFirstTime="No"%-
%___%_bqTopCorner%_bqTopAndTail%_bqTitleFormat
%-
%___%_bqText="%-
%______%_Strip_Text('%ClipBoard')%-
%______%Wrapped(%QInclude('Strip'))%-
%___"%-
%-
%___%SetPattRegExp='(?is)(\n)\z'%-
%___%If:"%RegExpMatch(%_bqText)"="":"%_bqText='%_bqText
'"+%-
%SetPattRegExp='(?is)\A(.*?)\n(.*\n)\z'%-
%RegExpBlindMatch(%_bqText)%-
%If:"%Subpatt(2)"<>"":"%-
%___%_bqSide%SubPatt(1)%-
%___%_bqText='%Subpatt(2)'
%___%QInclude(bqa)%-
":"%-
%___%_bqSide%_bqText%-
%___%_bqBottomCorner%_bqTopAndTail%-
%___%_bqFirstTime=''"%-
=====[ End  bqa QT]=====

This is not perfect and will "fail" in relatively common situations.
Perhaps the Strip QT should be modified to forcibly remove all newline
characters.  But I'll avoid that modification for now if the template
above does the trick for you.

-- 
Thanks for writing,
 Januk Aggarwal




________________________________________________________
 Current beta is 2.00 | "Using TBBETA" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to