font scale fix
This commit is contained in:
@ -169,11 +169,6 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener):
|
|||||||
if not infos:
|
if not infos:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.debug_message(
|
|
||||||
"on_close: view_id: %d, close_id: %d" % (markdown_view.id(), view.id())
|
|
||||||
)
|
|
||||||
assert markdown_view.id() == view.id(), "pre_close view.id() != close view.id()"
|
|
||||||
|
|
||||||
if markdown_view.id() in self.phantom_sets:
|
if markdown_view.id() in self.phantom_sets:
|
||||||
del self.phantom_sets[markdown_view.id()]
|
del self.phantom_sets[markdown_view.id()]
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font
|
|||||||
target_size = round(BASE_PX_SIZE * multiplier * font_scale)
|
target_size = round(BASE_PX_SIZE * multiplier * font_scale)
|
||||||
# Simple style setting (overwrites existing inline style if any)
|
# Simple style setting (overwrites existing inline style if any)
|
||||||
# A more robust solution would parse and merge existing styles
|
# A more robust solution would parse and merge existing styles
|
||||||
element['style'] = f"font-size: {target_size}px;"
|
element['style'] = "font-size: {}px;".format(target_size)
|
||||||
|
|
||||||
# FIXME: report that ST doesn't support <br/> but does work with <br />... WTF?
|
# FIXME: report that ST doesn't support <br/> but does work with <br />... WTF?
|
||||||
stylesheet = resources["stylesheet"] # Use only the base stylesheet
|
stylesheet = resources["stylesheet"] # Use only the base stylesheet
|
||||||
|
|||||||
Reference in New Issue
Block a user