1 Commits

Author SHA1 Message Date
guy176251 b9fd0b2741 wrong markdown parser 2026-06-07 04:47:51 -05:00
+19 -19
View File
@@ -1,6 +1,5 @@
from __future__ import absolute_import, print_function
import codecs
import os
import sys
from builtins import object
@@ -12,23 +11,24 @@ from .env import css_path, html_dir, html_extension, ms_encoding
class MarkdownConverter(object):
def __init__(self):
css = codecs.open(css_path, encoding=ms_encoding, mode="r")
self.html_header = (
"""
<html>
<head>
<style type='text/css'>
<!--
"""
+ css.read()
+ """
//-->
</style>
</head>
<body>
<div class='markdown-body'>
"""
)
with open(css_path, encoding=ms_encoding, mode="r") as css:
self.html_header = (
"""
<html>
<head>
<style type='text/css'>
<!--
"""
+ css.read()
+ """
//-->
</style>
</head>
<body>
<div class='markdown-body'>
"""
)
self.html_footer = """
</div>
</body>
@@ -36,7 +36,7 @@ class MarkdownConverter(object):
"""
def convert(self, src, dst=""):
code = pycmarkgfm.markdown_to_html(self.read_md(src))
code = pycmarkgfm.gfm_to_html(self.read_md(src))
return self.write_html(code, src, dst)
def read_md(self, file_name):