mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #392
This commit is contained in:
parent
42a90b9515
commit
f571a7b603
@ -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
Loading…
x
Reference in New Issue
Block a user