fix escaping of the & (helping #2)

This commit is contained in:
math2001
2016-12-10 08:08:05 +11:00
parent a9cfdd107f
commit e6ea13f0a2
4 changed files with 102 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from . import markdown2
import os.path
import re
from .escape_amp import *
from html.parser import HTMLParser
# Main sublime tools function
@ -123,6 +124,8 @@ def show_html(md_view, preview):
html = HTMLParser().unescape(html)
html = escape_amp(html)
# exception, again, because <pre> aren't supported by the phantoms
html = html.replace('&nbspespace;', '<i class="space">.</i>')
preview.erase_phantoms('markdown_preview')