This commit is contained in:
Kovid Goyal 2007-12-27 23:32:16 +00:00
parent 42a90b9515
commit f571a7b603
2 changed files with 497 additions and 433 deletions

View File

@ -58,11 +58,11 @@ def generate_html(txtfile, encoding, logger):
txt = codecs.open(txtfile, 'rb', enc).read()
logger.info('Converting text to HTML...')
md = markdown.Markdown(txt,
md = markdown.Markdown(
extensions=['footnotes', 'tables', 'toc'],
safe_mode=False,
)
html = md.toString()
html = md.convert(txt)
p = PersistentTemporaryFile('.html', dir=os.path.dirname(txtfile))
p.close()
codecs.open(p.name, 'wb', 'utf8').write(html)

File diff suppressed because it is too large Load Diff