All pastes #26293 Raw Edit

Untitled

public text v1 · immutable
#26293 ·published 2005-10-22 18:05 UTC
rendered paste body
26a27
> import urllib
29c30
< import util
---
> from trac import util
48c49,50
<               r"""(?P<wikilink>!?(^|(?<=[^A-Za-z]))[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+(?=\Z|\s|[.,;:!?\)}\]]))""",
---
>               r"""(?P<wikilink>!?(^|(?<=[^A-Za-z]))[A-Z]+[a-z]+[A-Z][A-Za-z]+(?=\Z|\s|[.,;:!?\)}\]]))""",
>               r"""(?P<wikiexlink>!?\[\[(?P<pagename>.*?)\]\])""",
208c210
<             return '<a class="missing" href="%s">%s?</a>' % \
---
>             return '<a class="missing" href="%s">%s</a>' % \
212a215,223
>     def _wikiexlink_formatter(self, match, fullmatch):
>         pagename = ' '.join(fullmatch.group('pagename').split())
>
>         if not self.env._wiki_pages.has_key(pagename):
>             return '<a class="missing" href="%s">%s</a>' % \
>                    (self._href.wiki(urllib.quote(pagename)), pagename)
>         else:
>             return '<a href="%s">%s</a>' % (self._href.wiki(pagename), pagename)
>