[Pmwiki-users] How "function:PrintText some text" behaves

Patrick R. Michaud pmichaud
Wed Aug 6 20:58:41 CDT 2003


On Thu, Aug 07, 2003 at 02:07:33PM +1200, John Rankin wrote:
> However, if I write
>   $PublishList[] = "function:PrintText ----\n!$number $name"; 
> I see the string
> function:PrintText ----!1 PageName
> (or whatever the values of $num and $name are).
> The \n is presumably the culprit. When I look at the PrintFmt source, 
> there is a line that looks for "function:" followed by a word, followed 
> by spaces, followed by (.*) -- I assume it gets to the \n and stops in 
> confusion. Looking back to earlier postings, would an "s" modifier 
> at the end of the preg_match fix this?
> 
> It's no big deal, but can anyone shed light? Thanks...

Yup, /s ought to fix it.  Added and released as pmwiki-0.5.17.  I went
ahead and added the /s to accept newlines in the file: and wiki: 
directives also (not that it makes a big difference there).

Pm



More information about the pmwiki-users mailing list