diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -1062,6 +1062,8 @@ def urlify_text(s, repo_name=None, link_ URLs links to what they say. Issues are linked to given issue-server. If link_ is provided, all text not already linking somewhere will link there. + >>> urlify_text("Urlify http://example.com/ and 'https://example.com' *and* markup/b>") + literal('Urlify http://example.com/ and 'https://example.com&apos; *and* <b>markup/b>') """ def _replace(match_obj): diff --git a/kallithea/lib/markup_renderer.py b/kallithea/lib/markup_renderer.py --- a/kallithea/lib/markup_renderer.py +++ b/kallithea/lib/markup_renderer.py @@ -150,6 +150,10 @@ class MarkupRenderer(object): @classmethod def plain(cls, source, universal_newline=True): + """ + >>> MarkupRenderer.plain('https://example.com/') + '
https://example.com/' + """ source = safe_str(source) if universal_newline: newline = '\n'