[pmwiki-users] PTVs on multiple lines

Hans Bracker design at softflow.co.uk
Mon Oct 19 03:49:43 CDT 2015


> If there is a potential case where a new unrequested "etc" variable will
> be created with the value ")", there is also a potential case where a 
> required variable will start with ")". In the both cases I fail to see a
> problem with the current core; if we modify the core to ignore a 
> variable starting with ")", I can imagine problems. I prefer not to 
> change it at this point.

I understand that. Regarding the text PTV pattern it will already be
very helpful if cases like the following are excluded:

var
:)

If cases like 'var:)' shall not be excluded, following your reasoning
that a PTV may well start with a ')' character, then still I would
argue that it seems wrong in the following case:

(:hidden:
var1: abc
var2: def
xyz:)

as 'xyz' is clearly just the end of the text in the PTV 'hidden',
and not intended to be read as a text PTV.
A human reader will see this, and the system should see this as well.
For my purpose I need to write code so 'xyz' is in this case not seen
as a text PTV 'xyz:)', just the last line of text in the  'hidden'
PTV. I also note that 'xyz:)' cannot be a nested PTV in 'hidden',
unless it occurs right at the end, ie. as this example shows, which
will break the 'hidden' PTV:

(:hidden:
var1: abc
var2: def
xyz:)
123
:)

I can see that for purpose of nesting PTVs a PTV markup is more useful
if it avoids the ':' used in the text PTV definition, and I may need
to adopt such an approach, failing to have code which filters out
cases like 'xyz:)' at the end of hidden PTVs.

When a form processing script writes the page content, if does not
matter too much what syntax the PTVs shall have. but I am aiming it to
be easy readable page source as well.


Best regards,
 Hans                         




More information about the pmwiki-users mailing list