On 4/6/06, <b class="gmail_sendername">Patrick R. Michaud</b> <<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
By convention PmWiki has always explicitly reserved the '='<br>character for custom markup sequences.</blockquote><div><br>Excepting [= =] ?? <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Can anybody educate me on why I broke >><< by defining ";", and/or suggest<br>> a suitable markup I could implement?<br>><br>> I had Markup("", "inline", "/;(.*?);/", "<span style='font-style:italic;
<br>> color:#0000c0;'>$1</span>");<br><br>It's probably not the semicolon that broke the markup...there<br>appear to be a couple of issues with the rule as written here:<br><br>1. Every markup needs a name; I don't know how PmWiki will
<br>react to using "" as a markup name. (I suspect not well at all.)</blockquote><div><br>Unintentional and I didn't realise until you pointed it out. Oops!<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2. Semicolons occur in lots of places other than markup text.<br>In particular, the string you're using to replace ";(.*?);"<br>contains a pair of semicolons itself. Since the replacement<br>string isn't escaped or preserved in any way, the semicolon
<br>replacement pattern is probably being a bit over-eager and<br>adding <span> around any pair of semicolons it may happen to find --<br>even those that are coming from other HTML tags or other markups.</blockquote>
<div><br>Ah the perils of knowing just enough to be dangerous! I must admit I was only thinking of the marked up text as seen in source/edit view and not of the generated HTML. I'll have a closer look at regex and try to tighten the rule, and use something with an =.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This last point is similar to the reason why it's difficult to do a<br>markup like /italic/ -- there are a lot of things that
<br>have slashes in them that aren't intended to be italics,<br>such as urls (<a href="http://www.pmwiki.org/wiki/PmWiki">http://www.pmwiki.org/wiki/PmWiki</a>), fractions (3/4),<br>and/or, closing HTML tags such as </b>, </span>, etc.
</blockquote><div><br></div></div>Point well made.<br><br>Does this suggest the need for a page in the standard distribution which somehow utilises *all* of the markup rules? Maybe that is to big an ask? I would imagine only one sort of directive would be required, which would help reduce the requirement.
<br><br>See I was lucky in that to get to the page where I wanted to deploy the ; ; markup I had to go through one with >><< which is what broke. If I hadn't I don't know how long it would have taken me to stumble on the problem. By having a page as described above, it would allow a quick comparison check to see if anything had broken.
<br><br>Just a thought.<br clear="all"><br>-- <br>Allister