Benjamin Grassineau writes:
Now, if we break a line in the ptv, for example

(:a: Youpi
 How are you ?:)

(:if equal "{$:a}" "Youpi":)OK(:if:)

We obtain

"(:if equal "Youpi How are you ?" "Youpi":)OK"

Wich is not exactly what we wish to obtain !!

It is important to note that when there is a Page(Text)Variable in a wiki page, almost at the very beginning of the processing the value or the text content of this variable is pasted in the page, without any modification. This happens very early, long before the markup engine starts processing conditionals. (And this is done because some PageTextVariables contain wiki markup that needs to be processed too.)

So, when conditionals are processed, your page contains something like this:

(:if equal "Youpi
How are you ?" "Youpi":)OK(:if:)

Unfortunately it is not possible to have line breaks inside the (:if:) conditional markup, so PmWiki doesn't recognize the pattern, and leaves it as plain text (line breaks inside plain text are converted to spaces by your browser, so you see it as a single line).

I am not aware of a recipe that does what you want.

It may be easier to test for a variable that cannot have line breaks or quotes.

Petko


_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to