[pmwiki-users] Using Page Text Variables {$:Var} for multi-line Includes

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 16 10:59:20 CDT 2006


On Tue, Oct 10, 2006 at 06:21:52AM -0700, Pico wrote:
> How about a special paragraph style rule that is triggered when a colon
> is followed by a carrage return, like this.
> 
> Name: Elmer Fudd
> Phone: 123.456.7890
> Address: 
> Street 
> City, State Postal Code 
> Country
> 
> The content of the address variable would start after the first carriage
> return and would end when a paragraph end is encountered: two returns
> would be required to end the variable definition.  

The classic approach to this is known as the "heredoc", where one
says "everything up to XYZ marker".  So, something like this could
work if we assume that the XYZ marker is "a blank line".

> With this format,
> the question arises as to whether the content should be returned as a
> wrapped paragraph, or whether breaks should be inserted at the end of
> each line.  

AFAIC, the default handling of page text variables should return *exactly* 
the contents of the original page, it should not be doing any modification
of the results.

Pm




More information about the pmwiki-users mailing list