Mercurial > public > sg101
diff gpp/core/markup.py @ 211:3a626c48e9ae
Fix #81: could not get paragraphs in Markdown due to the interaction between smiley and Markdown. Refactored the smilify code to use a series of regular expressions over the text when working with markdown.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 08 May 2010 23:44:59 +0000 |
parents | 48621ba5c385 |
children | a321685505cc |
line wrap: on
line diff
--- a/gpp/core/markup.py Fri May 07 02:56:49 2010 +0000 +++ b/gpp/core/markup.py Sat May 08 23:44:59 2010 +0000 @@ -4,7 +4,7 @@ import markdown as _markdown from django.utils.encoding import force_unicode -from smiley import Smilify +from smiley import SmilifyMarkdown class Markdown(object): """ @@ -42,10 +42,10 @@ """ def __init__(self): self.md = Markdown() - self.smiley = Smilify() + self.smiley = SmilifyMarkdown() def convert(self, s): - return self.md.convert(self.smiley.markdown(s)) + return self.md.convert(self.smiley.convert(s)) def site_markup(s):