diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-09-28 20:50:20 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-09-28 20:50:20 +0000 |
commit | ed4b6afc9b3b43e1f7e70ff01a77472c7983a549 (patch) | |
tree | ce96eb7fc9c360b69e82409961340619f15f9c6c /IkiWiki | |
parent | a75df2a43898bdbcdcc86cd4b3d06040a49574aa (diff) |
* camelcase: Tighten regexp to avoid false positives. WikiWords are only
linkified now if they are preceeded by whitespace.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/camelcase.pm | 9 |
1 files changed, 5 insertions, 4 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 + (?<![^A-Za-z0-9\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 ( (?: [A-Z] # Uppercase start |