[pmwiki-devel] Understanding parsing of white space

Simon nzskiwi at gmail.com
Mon Feb 28 03:18:04 CST 2011


I have a recipe

## Add a custom markup
Markup( 'ChordPro',
  'fulltext', "/\\|\\|:(.*?):\\|\\|/seim",
  "Keep(ChordPro_Parse(explode(\"\n\",PSS('$1'))))" );
# s = dot matches all chars including newline
# e = backreference substitution by expression
# i = case insensitive
# m = multiline
# uses lazy evaluation, preserves leading and trailing white space
# Keep prevents PmWiki markup being applied

There is a bit left out, but ...
  $linecount = count($cho);
  for( $i=0; $i<$linecount; $i++ ) {
    # iterate through the ChordPro lines
    $choline = $cho[$i];


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?

I can provide details and debug

tia

Simon



More information about the pmwiki-devel mailing list