[pmwiki-users] ExtendedMarkup WikiWord Error
Stan Ritchie
stan at ritchietribe.net
Wed Mar 30 16:05:36 CST 2005
Hi Guys,
Thanks for you help on this one. I made the change Paul indicates by
adding the /s. This does eliminate the error and I can create pages,
but the wikilink has many double quotes added to it like:
<""""""""'""""""""""""""'""""""""'""""""""""""""""""""""""""""""""""""""""""'"Stan
<http://www.christiancyclingpa.com/pmwiki/index.php?n=Members.StanRitchie?action=edit>
<""""""""'""""""""""'"""""""'""""""""""""""""""""""""""""""""""""""""""'"?
<http://www.christiancyclingpa.com/pmwiki/index.php?n=Members.StanRitchie?action=edit>
Any ideas?
Again, thanks for the prompt response and help. I've been working with
PmWiki for about a month and am having a blast!
You guys are doing a great job with this stuff!
Stan
Patrick R. Michaud wrote:
>On Thu, Mar 31, 2005 at 09:28:22AM +1200, John Rankin wrote:
>
>
>>This is a known limitation in how ExtendMarkup handles smart quotes.
>>
>>In short, if an html tag < ... > breaks across more than 2 lines,
>>the piece of code that ignores quotes inside < ... > breaks.
>>
>>
>
>Oh! Did you try adding the /s option to the relevant patterns?
>I'm guessing that the code to handle this is given in:
>
> ## automatic smart quotes
> Markup('<n>','<squo',"/\s?\n\s*([^<]+?>)/",' $1');
> Markup('squo','>style',"/(<.*?>['\"]*)|(.?['\"]+)/e",
> "BypassHTML(PSS('$1'),PSS('$2'))");
> Markup('sq|','>inline',"/(\\[\\[[^|\\]]+\\|)(.*?)(\\]\\])/e",
> "'$1'.SmartenLinkText(PSS('$2')).'$3'");
> Markup('sq->','>inline',"/(\\[\\[)([^\\]]+?)(-+>.*?\\]\\])/e",
> "'$1'.SmartenLinkText(PSS('$2')).'$3'");
>
>By default the '.' in a pattern doesn't match newlines, but adding
>the 's' option, as in
>
> ## automatic smart quotes
> Markup('<n>','<squo',"/\s?\n\s*([^<]+?>)/",' $1');
> Markup('squo','>style',"/(<.*?>['\"]*)|(.?['\"]+)/es",
> "BypassHTML(PSS('$1'),PSS('$2'))");
> Markup('sq|','>inline',"/(\\[\\[[^|\\]]+\\|)(.*?)(\\]\\])/es",
> "'$1'.SmartenLinkText(PSS('$2')).'$3'");
> Markup('sq->','>inline',"/(\\[\\[)([^\\]]+?)(-+>.*?\\]\\])/es",
> "'$1'.SmartenLinkText(PSS('$2')).'$3'");
>
>will tell those .*?'s that they can match newlines as well. There
>may be other reasons why it's not working (or won't work), but this
>is my first guess/thought about it.
>
>Or, one could conceivably convert any newlines found inside
>< ... > into spaces before doing the rest of the pattern matches. But
>the /s solution above is probably vastly superior and faster.
>
>Pm
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20050330/6f6bd63a/attachment.html
More information about the pmwiki-users
mailing list