From ed4b6afc9b3b43e1f7e70ff01a77472c7983a549 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 28 Sep 2007 20:50:20 +0000 Subject: [PATCH] * camelcase: Tighten regexp to avoid false positives. WikiWords are only linkified now if they are preceeded by whitespace. --- IkiWiki/Plugin/camelcase.pm | 9 +++++---- debian/changelog | 4 +++- ...iWords_should_only_be_done_outside_html_tags.mdwn | 12 ++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/IkiWiki/Plugin/camelcase.pm b/IkiWiki/Plugin/camelcase.pm index dc89f1b90..845a516ee 100644 --- a/IkiWiki/Plugin/camelcase.pm +++ b/IkiWiki/Plugin/camelcase.pm @@ -16,10 +16,11 @@ sub filter (@) { #{{{ # Make CamelCase links work by promoting them to fullfledged # WikiLinks. This regexp is based on the one in Text::WikiFormat. $params{content}=~s{ - (?=]) # try to avoid expanding non-links - # with a zero width negative lookbehind for - # characters that suggest it's not a link - \b # word boundry + (? Mon, 24 Sep 2007 12:48:35 -0400 + -- Joey Hess Fri, 28 Sep 2007 16:45:29 -0400 ikiwiki (2.8) unstable; urgency=low diff --git a/doc/bugs/parsing_for_WikiWords_should_only_be_done_outside_html_tags.mdwn b/doc/bugs/parsing_for_WikiWords_should_only_be_done_outside_html_tags.mdwn index 7f108ff12..44938c754 100644 --- a/doc/bugs/parsing_for_WikiWords_should_only_be_done_outside_html_tags.mdwn +++ b/doc/bugs/parsing_for_WikiWords_should_only_be_done_outside_html_tags.mdwn @@ -3,7 +3,15 @@ When having a link to e.g. http://www.chumba.com/media/Chumbawamba-EnoughIsEnoug You can see an example of the breakage on - scroll down to the Chumbawamba entry. >> There's a great workaround for this bug: Disable the ->> [[plugins/camelcase]] plugin. :-) +>> [[plugins/camelcase]] plugin. :-) I really don't recommend using that +>> plugin. _Especially_ not when aggregating third-party content as you do +>> in the example. +>> +>> Fixing this at the html parsing level would involve making ikiwiki 2 +>> times slower, not even counting the html parsing overhead, since it +>> would have to fully render pages in the "scan" pass. +>> +>> All I can do is improve the regexp it uses to try to avoid false +>> positives. Which I've now [[done]]. >> ->> The fix involves modifying its regexp to look for surrounding brackets. >> --[[Joey]] -- 2.44.0