PITS /
01525: Line continuation in Page Text Variables
Summary: Line continuation in Page Text Variables
Created: 2025-08-27 22:13
Status: Open
Category: Bug
From: simon
Assigned:
Priority: 3
Version: latest
OS: PHP 8.3
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 |
this is effectively the same as the primary example, so should work the same
:otherpagetextvariable1 : some \\ split \\ lines {$:otherpagetextvariable1} other text |
some |
line break works as expected
:otherpagetextvariable2 : [=some concatenated lines=] {$:otherpagetextvariable2} other text |
[=some other text |
arguably the "tokenisation" should occur first, so the text variable should include all the text in the brackets
[= =]
:otherpagetextvariable3 : [@some split lines@] {$:otherpagetextvariable3} other text |
[@some other text |
arguably the "tokenisation" should occur first, so the text variable should include all the text in the brackets
[@ @]
[@ :otherpagetextvariable4 : some split lines@] {$:otherpagetextvariable4} other text | :otherpagetextvariable4 : some split lines some other text |
if the "tokenisation" came first, so the text variable would not exist
(:if false:) :otherpagetextvariable5 : some text (:ifend:) {$:otherpagetextvariable5} other text | some text other text |
this is understandable given the parsing priority (tokenisation before in-line markup before multi-line markup)
(:WrappingPTV: :otherpagetextvariable6 : something else :otherpagetextvariable7 : nothing else at all :) * {$:otherpagetextvariable6} * {$:otherpagetextvariable7} {$:WrappingPTV} other text |
at all other text |
interesting example
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
thanks for the interesting examples. I'm not trying to relitigate markup processing order. Just to understand it and to ensure that design choices are logical, made deliberately, and intuitively make sense simon
otherpagetextvariable8: some concatenated lines {$:otherpagetextvariable8} other text | otherpagetextvariable8: some concatenated lines some other text |