[pmwiki-devel] Understanding parsing of white space

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 28 07:19:57 CST 2011


On Mon, Feb 28, 2011 at 10:18:04PM +1300, Simon wrote:
> When I get to a blank line (at least in the source)
> I find the value in $choline is
> <:vspace>
> or
> "3c3a7673706163653e"
> and len($choline) is 9
> 
> can anyone explain to me what is happening?

During the course of markup translation, new blank lines often get 
added and removed from the text that is being worked on.  PmWiki 
wants to know which blank lines came from the original author's text, 
so one of its first translations is to convert all blank lines into
"<:vspace>" tags.  These then get removed and/or changed into
other HTML by later markup rules.

You probably want to add something like:

    if ($choline == '<:vspace>') $choline = '';

in order to return to the original text.

Pm



More information about the pmwiki-devel mailing list