From edb424de993e351be84aa4c99ccdf4deb49f469d Mon Sep 17 00:00:00 2001 From: Christian Morpurgo Date: Thu, 24 Apr 2025 20:20:08 +0200 Subject: [PATCH] font scale fix --- MarkdownLivePreview.py | 5 ----- markdown2html.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/MarkdownLivePreview.py b/MarkdownLivePreview.py index b285727..c9c9fa8 100644 --- a/MarkdownLivePreview.py +++ b/MarkdownLivePreview.py @@ -169,11 +169,6 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener): if not infos: 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: del self.phantom_sets[markdown_view.id()] diff --git a/markdown2html.py b/markdown2html.py index 09df2db..742b9c3 100644 --- a/markdown2html.py +++ b/markdown2html.py @@ -107,7 +107,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font target_size = round(BASE_PX_SIZE * multiplier * font_scale) # Simple style setting (overwrites existing inline style if any) # 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
but does work with
... WTF? stylesheet = resources["stylesheet"] # Use only the base stylesheet