mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
README: don't add empty pre tag for empty readme
This commit is contained in:
parent
96544a5d62
commit
a6579ef7f5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue