mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Use markdown2 instead of markdown
Adds support for quotes, blockquotes, spoilers and tables
This commit is contained in:
parent
48964d1410
commit
19e064f232
2 changed files with 4 additions and 3 deletions
|
@ -9,4 +9,4 @@ PyNaCl
|
|||
async_timeout
|
||||
raven
|
||||
bcrypt
|
||||
markdown
|
||||
markdown2
|
||||
|
|
|
@ -3,7 +3,7 @@ from flask import session as fl_session
|
|||
import db
|
||||
import bcrypt
|
||||
import configparser
|
||||
import markdown
|
||||
import markdown2
|
||||
import datetime
|
||||
import telegram
|
||||
|
||||
|
@ -176,7 +176,8 @@ def page_wiki(key: str):
|
|||
db_session.close()
|
||||
if wiki_page is None:
|
||||
return render_template("wiki.html", key=key)
|
||||
converted_md = Markup(markdown.markdown(escape(wiki_page.content), output_format="html5"))
|
||||
converted_md = Markup(markdown2.markdown(escape(wiki_page.content), output_format="html5"),
|
||||
extras=["spoiler", "tables"])
|
||||
return render_template("wiki.html", key=key, wiki_page=wiki_page, converted_md=converted_md,
|
||||
wiki_log=wiki_latest_edit)
|
||||
elif request.method == "POST":
|
||||
|
|
Loading…
Reference in a new issue