add settings for YAML/TOML header #17

This commit is contained in:
Mathieu
2017-02-03 17:19:11 +11:00
parent c92d78fb20
commit 3be12b0539
4 changed files with 26 additions and 3 deletions

View File

@ -48,8 +48,12 @@ def get_style():
return content
def markdown2html(md, basepath):
# removes/format the header.
md = manage_header(md, get_settings().get('header_action'))
html = '<style>\n{}\n</style>\n'.format(get_style())
# the option no-code-highlighting does not exists in the official version of markdown2 for now
# I personaly edited the file (markdown2.py:1743)
html += md2.markdown(md, extras=['fenced-code-blocks', 'no-code-highlighting', 'tables'])