diff --git a/MarkdownLivePreview.py b/MarkdownLivePreview.py index f7d5f78..ab7fa10 100644 --- a/MarkdownLivePreview.py +++ b/MarkdownLivePreview.py @@ -207,8 +207,6 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener): resources ) - print(repr(html)) - self.phantom_sets[markdown_view.id()].update([ sublime.Phantom(sublime.Region(0), html, sublime.LAYOUT_BLOCK, lambda href: sublime.run_command('open_url', {'url': href})) diff --git a/markdown2html.py b/markdown2html.py index 2468b1f..d053da6 100644 --- a/markdown2html.py +++ b/markdown2html.py @@ -71,14 +71,15 @@ def markdown2html(markdown, basepath, re_render, resources): # FIXME: this method sucks, but can we do better? fixed_pre = str(code_element) \ - .replace('\n', '
')\ - .replace(' ', '.') + .replace(' ', '.') \ + .replace('\n', '
') code_element.replace_with(bs4.BeautifulSoup(fixed_pre, "html.parser")) # FIXME: highlight the code using Sublime's syntax - return "\n\n{}".format(resources['stylesheet'], soup) + # FIXME: report that ST doesn't support
but does work with
... WTF? + return "\n\n{}".format(resources['stylesheet'], soup).replace('
', '
') def get_base64_image(path, re_render):