def generate_preview(text):
    # templatefile = open(os.path.join(sublime.packages_path(), "Markdown HTML Preview", "dist", "index.html"), "r")
    # html = templatefile.read()

    # No encoding for ST3
    if 3000 > int(sublime.version()):
        return html.replace("%%%CONTENT%%%", text.replace('<', '&lt;').replace('>', '&gt;'))

    return html.replace("%%%CONTENT%%%", text.encode('utf-8', 'ignore').replace('<', '&lt;').replace('>', '&gt;'))
dataset/ETHPy150Open zeyon/MarkdownHtmlPreview/src/MarkdownHtmlPreview.py/generate_preview/swapped operands of `>`