Skip to content
This repository has been archived by the owner on Apr 15, 2018. It is now read-only.

Commit

Permalink
highlight at user
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed May 16, 2013
1 parent 8f0bf6a commit 5b1571a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions june/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def autolink(self, link, is_email):

return '<a href="%s" rel="nofollow">%s</a>' % (link, title)

def paragraph(self, text):
pattern = re.compile(r'\s@(\w+)')
text = pattern.sub(r'@<a href="/user/\1">\1</a> ', text)
pattern = re.compile(r'^@(\w+)')
text = pattern.sub(r'@<a href="/user/\1">\1</a> ', text)
return '<p>%s</p>' % text


def rich_markdown(text):
if text is None:
Expand Down

0 comments on commit 5b1571a

Please sign in to comment.