[Pmwiki-users] Strange Markup Effect

Patrick R. Michaud pmichaud at pobox.com
Sat Jan 29 10:48:34 CST 2005


On Sun, Jan 23, 2005 at 04:54:32PM +0100, Philippe Krait wrote:
> After entering this code:
>     Markup('Roll','<block','/\\(:(roll|result)(\\s.*?)?:\\)/e',
>       "Roll($1, PSS('$2'))");
> I find that, on the pages on which I use the following markup:
>     (:roll a=Neldrann d=20 n=1 x="Spot" s=PK b="11|Skill" r=result:)
> The following text is displayed at the top of the page (as through the 
> use of "echo"), before even the logo:
>     pat=/\(:(roll|result)(\s.*?)?:\)/e
> Any clue as to what I did wrong ?

The 'pat=' error message appears whenever there's an error
in executing one of the Markup replacement patterns.  (PHP doesn't
generate its own error message in this case, so PmWiki has to catch
and display one.)  

In the above case, the problem is that after replacing the $1 and $2, the
"Roll($1, PSS('$2'))" line to be executed above becomes

    Roll(roll, PSS(' a=Neldran d=20 n=1 x="Spot" s=PK b="11|Skill" r=result'))

and that first argument (roll) is a syntax error.  You probably meant
to put quotes around it, as in

    "Roll('$1', PSS('$2'))" 

Pm



More information about the pmwiki-users mailing list