01525: Line continuation in Page Text Variables
Description:
:mypagetextvariable : some \ concatenated \ lines |
|
{PITS/01525$:mypagetextvariable}
other text
| some other text |
I had hoped the 'line joining' ("\") would be done prior to page text variable assembly.
I expected the see the output:
some concatenated lines
great examples, some thoughts below
How about these cases below, what would you expect:
otherpagetextvariable: some
concatenated
lines
{$:otherpagetextvariable}
other text
| otherpagetextvariable: some concatenated lines some other text |
:otherpagetextvariable1 : some \\
split \\
lines
{$:otherpagetextvariable1}
other text
|
some |
:otherpagetextvariable2 : [=some
concatenated
lines=]
{$:otherpagetextvariable2}
other text
|
[=some other text |
[= =]
:otherpagetextvariable3 : [@some
split
lines@]
{$:otherpagetextvariable3}
other text
|
[@some other text |
[@ @]
[@
:otherpagetextvariable4 : some
split
lines@]
{$:otherpagetextvariable4}
other text
| :otherpagetextvariable4 : some split lines some other text |
(:if false:)
:otherpagetextvariable5 : some text
(:ifend:)
{$:otherpagetextvariable5}
other text
| some text other text |
(:WrappingPTV:
:otherpagetextvariable6 : something else
:otherpagetextvariable7 : nothing else
at all
:)
* {$:otherpagetextvariable6}
* {$:otherpagetextvariable7}
{$:WrappingPTV}
other text
|
at all other text |
This page text variable pattern is designed to only take the text up to the end of line. The trailing backslash will be included and processed later - possibly joining the next line in the place the PTV is inserted. Petko
otherpagetextvariable8: some
concatenated
lines
{$:otherpagetextvariable8}
other text
| otherpagetextvariable8: some concatenated lines some other text |
We could allow for custom functions to be configured, one could pre-process the page text before searching for the page text variables. For example, it could join the lines ending in backslash, and tokenize the escaped texts. The variables could then be assigned. A post-processing function could then restore the escaped markup. Since this would change the existing processing, webmasters would have the responsibility to maintain it (and some core functions and templates may stop working). Petko