plugin talk: tolte estensioni inutili

This commit is contained in:
boyska 2018-06-17 17:15:17 +02:00
parent 8f631d54ef
commit 8023b00d7f

View file

@ -17,7 +17,7 @@ import locale
from contextlib import contextmanager
from babel.dates import format_date, format_datetime, format_time
import markdown
from markdown import markdown
from docutils import nodes
from docutils.parsers.rst import directives, Directive
@ -161,9 +161,7 @@ def jinja_env():
loader=jinja2.FileSystemLoader(os.path.join(pelican.settings['TALKS_PATH'], '_templates')),
autoescape=True,
)
env.filters['markdown'] = lambda text: \
jinja2.Markup(markdown.Markdown(extensions=['meta']).
convert(text))
env.filters['markdown'] = lambda text: jinja2.Markup(markdown(text))
env.filters['dateformat'] = format_date
env.filters['datetimeformat'] = format_datetime
env.filters['timeformat'] = format_time