Sort of fixed #97

This commit is contained in:
Frisk 2020-03-21 13:53:48 +01:00
parent 55ee290777
commit 4b9b75bf09
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -229,6 +229,7 @@ def compact_formatter(action, change, parsed_comment, categories):
author_url = link_formatter(create_article_path("User:{user}".format( user=change["user"])))
author = change["user"]
parsed_comment = "" if parsed_comment is None else " *("+parsed_comment+")*"
parsed_comment = re.sub(r"([^<]|\A)(http(s)://.*?)( |\Z)", "\\1<\\2>\\4", parsed_comment) # see #97
if action in ["edit", "new"]:
edit_link = link_formatter("{wiki}index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(
wiki=WIKI_SCRIPT_PATH, pageid=change["pageid"], diff=change["revid"], oldrev=change["old_revid"],