# HG changeset patch # User Andrew Shadura # Date 1430840290 -7200 # Node ID 588a160dbb9a549db6136c60df5d9c67dbbdc6b3 # Parent d660ccdd628d9d789c8e69577b7a5ea92507d99c rst: in @mention parser, escape spaces so they don't go to HTML This eliminates extra spaces around @mentions. Every time mention was followed by a comma, for example: @username, have you seen it? it turned into: @username , have you seen it? So an extra space was inserted. It was inserted because otherwise rst parser might not recognise the markup (i.e. @user1,@user2 is replaced by **user1**,**user2** — that would be interpreted as user1**,**user2). See http://docutils.sf.net/docs/ref/rst/restructuredtext.html#character-level-inline-markup diff -r d660ccdd628d -r 588a160dbb9a kallithea/lib/markup_renderer.py --- a/kallithea/lib/markup_renderer.py Wed May 06 16:21:51 2015 +0200 +++ b/kallithea/lib/markup_renderer.py Tue May 05 17:38:10 2015 +0200 @@ -193,6 +193,6 @@ def wrapp(match_obj): uname = match_obj.groups()[0] - return ' **@%(uname)s** ' % {'uname': uname} + return '\ **@%(uname)s**\ ' % {'uname': uname} mention_hl = mention_pat.sub(wrapp, source).strip() return cls.rst(mention_hl)