# HG changeset patch # User Brian Neal # Date 1299035779 0 # Node ID a321685505cc1218b173ac4ea067591bb4f9fa49 # Parent b783a555cd8706ebd328fbbaf9beeb88f41bcd74 Fixing #163; make plain links linkable in Markdown. Use an extension found here: https://github.com/r0wb0t/markdown-urlize. diff -r b783a555cd87 -r a321685505cc gpp/core/markup.py --- a/gpp/core/markup.py Wed Mar 02 02:51:00 2011 +0000 +++ b/gpp/core/markup.py Wed Mar 02 03:16:19 2011 +0000 @@ -10,7 +10,7 @@ """ This is a thin wrapper around the Markdown class which deals with the differences in Markdown versions on the production and development server. - This code was inspired by the code in + This code was inspired by the code in django/contrib/markup/templatetags/markup.py. Currently, we only have to worry about Markdown 1.6b and 2.0. """ @@ -18,7 +18,7 @@ # Unicode support only in markdown v1.7 or above. Version_info # exists only in markdown v1.6.2rc-2 or above. self.unicode_support = getattr(_markdown, "version_info", None) >= (1, 7) - self.md = _markdown.Markdown(safe_mode=safe_mode) + self.md = _markdown.Markdown(safe_mode=safe_mode, extensions=['urlize']) def convert(self, s): if self.unicode_support: