[pmwiki] Re: [Pmwiki-users] Whitepaper about markup strategy
Patrick R. Michaud
pmichaud at pobox.com
Fri May 16 18:00:56 CDT 2003
On Sat, May 17, 2003 at 12:37:55AM +0200, Bernhard Weichel in pmwiki-users wrote:
> > Oh. If you really want the XML tags, just use $DoubleBrackets to
> > preserve them and convert them back into html markup! Something like
> > (in local.php):
>
> I see, how it could be done. Am I right to say that it uses the entity
> markup within the pattern in DoubleBrackets (not that I fully understand
> it).
> Then the author has no way to express "<" in his content.
Not entirely, the "<" and ">" only get treated like XML if the < is
immediately followed by a recognized XML tag (from $XMLTags) and if it's
followed by a greater than sign. So, a "<" or ">" by themselves are
still handled properly, and even something like <pmichaud at pobox.com>
works okay because "pmichaud" isn't one of the accepted XML tags.
And even if someone doesn't want to enumerate all of the possible XML
tags one can make the system fairly smart--for example, all XML tags
must be lowercase letters. Thus one can use a pattern of
/\\<(\\/?[a-z]+(\\s.?*|\\/)?)\\>/
which keeps it fairly precise (but would still miss cases where someone
*wants* an XML or HTML tag to be displayed on the wiki page and not
treated as XML or HTML).
> How would he then enter [[<<]]? (the markup I dislike the most ;-).
He would enter it as [[<<]], same as he does now. Again, since the
"<" signs aren't part of something that can be valid XML, they would
be treated like greater than signs and not an XML tag.
And I truly hate the [[<<]] markup also, but I just haven't come up
with a good alternative. I'm definitely open for suggestions. This
is the *one* instance where I have almost resorted to allowing an HTML
tag ("<br>") to be valid PmWiki markup. I decided not to do it
for fear of opening the flood gates to more HTML sequences, and to
avoid the "you already allow <br>, why not allow...?" petitions for
including other HTML tags. 1/2 :-)
Pm
More information about the pmwiki-users
mailing list