parent
ce98f93934
commit
c38851a6cd
@ -72,7 +72,7 @@ def Markdown(extensions=("strikethrough", "superscript", "autolink")):
|
|||||||
md = misaka.Markdown(Unofficial(), extensions=flags)
|
md = misaka.Markdown(Unofficial(), extensions=flags)
|
||||||
|
|
||||||
def inner(text):
|
def inner(text):
|
||||||
rv = md.render(text).rstrip("\n")
|
rv = md(text).rstrip("\n")
|
||||||
if rv.startswith("<p>") or rv.endswith("</p>"):
|
if rv.startswith("<p>") or rv.endswith("</p>"):
|
||||||
return rv
|
return rv
|
||||||
return "<p>" + rv + "</p>"
|
return "<p>" + rv + "</p>"
|
||||||
|
4
setup.py
4
setup.py
@ -5,8 +5,8 @@ import sys
|
|||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
requires = ['html5lib==0.9999999', 'itsdangerous', 'Jinja2',
|
requires = ['itsdangerous', 'Jinja2', 'misaka>=2.0,<3.0', 'html5lib<0.9999999',
|
||||||
'misaka>=1.0,<2.0', 'werkzeug>=0.9']
|
'werkzeug>=0.9']
|
||||||
|
|
||||||
if sys.version_info < (2, 7):
|
if sys.version_info < (2, 7):
|
||||||
raise SystemExit("Python 2 versions < 2.7 are not supported.")
|
raise SystemExit("Python 2 versions < 2.7 are not supported.")
|
||||||
|
Loading…
Reference in New Issue
Block a user