Changeset 774
- Timestamp:
- May 20, 2006, 11:25:41 AM (18 years ago)
- Location:
- wikigoodiesplugin/0.9/goodies
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
wikigoodiesplugin/0.9/goodies/__init__.py
r356 r774 3 3 from symbols import Symbols 4 4 from mozilla import Mozilla 5 from mailto import MailToLink 5 6 6 7 -
wikigoodiesplugin/0.9/goodies/mailto.py
r773 r774 11 11 12 12 from trac.core import implements, Component 13 from trac.util.markup import html 13 14 from trac.wiki import IWikiSyntaxProvider 14 15 15 16 16 class M ozilla(Component):17 class MailToLink(Component): 17 18 18 19 implements(IWikiSyntaxProvider) … … 21 22 22 23 def get_wiki_syntax(self): 23 word = r"[\w'!]+" 24 yield (r"(?:^|(?<=\W))(?:\*%s\*|/%s/|_%s_)(?:(?=\W)|$)" % ((word,)*3), 25 lambda x, y, z: (y[0] == '*' and '<strong>%s</strong>' or 26 y[0] == '/' and '<em>%s</em>' or 27 '<span class="underline">%s</span>') % y[1:-1]) 24 yield (r"<[^@]+@[^>]+>", 25 lambda x, y, z: html.A(y, href="mailto:%s" % y[1:-1])) 28 26 29 27 def get_link_resolvers(self):
Note: See TracChangeset
for help on using the changeset viewer.