~sircmpwn/hub.sr.ht

a6579ef7f5a550fe2dd1a01066b587adfb7ec397 — Drew DeVault 2 months ago 96544a5 0.11.5
README: don't add empty pre tag for empty readme
1 files changed, 3 insertions(+), 1 deletions(-)

M hubsrht/services.py
M hubsrht/services.py => hubsrht/services.py +3 -1
@@ 23,8 23,10 @@ def format_readme(content, filename="", link_prefix=None):
    if ext in markdown_exts:
        html = markdown(content,
                link_prefix=link_prefix)
    else:
    elif content:
        html = f"<pre>{escape(content)}</pre>"
    else:
        html = ""
    return Markup(html)

def try_html_readme(session, prefix, user, repo_name):