Mercurial > kallithea
changeset 4402:10190008738e
helpers: include #target in automatic urlification
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 01 Aug 2014 20:28:42 +0200 |
parents | 4df61d1bd2d5 |
children | d9948f5ac7af |
files | kallithea/lib/helpers.py kallithea/lib/markup_renderer.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/helpers.py Fri Aug 01 20:28:42 2014 +0200 +++ b/kallithea/lib/helpers.py Fri Aug 01 20:28:42 2014 +0200 @@ -1235,7 +1235,7 @@ :param text_: """ - url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]''' + url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+#]''' '''|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)''') def url_func(match_obj):
--- a/kallithea/lib/markup_renderer.py Fri Aug 01 20:28:42 2014 +0200 +++ b/kallithea/lib/markup_renderer.py Fri Aug 01 20:28:42 2014 +0200 @@ -128,7 +128,7 @@ newline = '\n' source = newline.join(source.splitlines()) def urlify_text(text): - url_pat = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]' + url_pat = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+#]' '|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)') def url_func(match_obj):