Update markdown_converter.py

This commit is contained in:
Hooman behnejad
2017-06-26 18:55:42 +04:30
committed by GitHub
parent 8e3177d106
commit b0ad94e95c
+5 -1
View File
@@ -40,7 +40,11 @@ class MarkdownConverter(object):
if dst != "": if dst != "":
html_path = dst html_path = dst
try:
os.makedirs('/'.join(html_path.replace('\\', '/').split('/')[:-1]))
except OSError as exc:
pass
html_file = codecs.open(html_path,encoding=ms_encoding,mode='w') html_file = codecs.open(html_path,encoding=ms_encoding,mode='w')
html_file.write(self.html_header + body + self.html_footer) html_file.write(self.html_header + body + self.html_footer)
return html_path return html_path