[pmwiki-users] Conditional markup equal with quotes
Dominique Faure
dominique.faure at gmail.com
Tue Jun 5 14:52:27 CDT 2007
On 6/5/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Jun 05, 2007 at 08:57:13PM +0200, Christophe David wrote:
> > Would someone have an idea how to determine if PageTextVar1 is defined
> > and/or blank, and possibly how to make the equal succeed ? Without
> > the quotes, there is of course no problem.
> >
> >
> > (:PageTextVar1:abc "de" 'fg' hij:)
> >
> > (:if equal ({$:PageTextVar1}) (abc "de" 'fg' hij) :)
> > OK
> > (:ifend:)
>
> I've sometimes wondered if we need to add another quoting
> character to ParseArgs to be able to handle cases with
> multiple sets of quotes. Something like:
>
> (:if equal «{$:PageTextVar1}» «abc "de" 'fg' hij» :)
>
> Perhaps we could just treat parens and brackets as quoting
> characters as well. But somehow that seems just a bit
> dangerous.
>
How about providing a way to compare two "kept" strings ?
(:PageTextVar1:[=abc "de" 'fg' hij=]:)
(:if equal_variant {$:PageTextVar1} [=abc "de" 'fg' hij=] :)
--
Dominique
More information about the pmwiki-users
mailing list