feat(markdown): apply active theme syntax palette to code blocks
This commit is contained in:
@@ -73,6 +73,13 @@ class MarkdownRenderer:
|
||||
# Optional callback for custom local link handling (e.g., opening in IDE)
|
||||
self.on_local_link: Optional[Callable[[str], None]] = None
|
||||
|
||||
# Apply the current theme's syntax palette on construction so new
|
||||
# editors we create pick up the right colors. The renderer is re-created
|
||||
# when the theme changes (see theme_2 module-load behavior).
|
||||
from src import theme_2
|
||||
palette_id = theme_2.get_syntax_palette_for_theme(theme_2.get_current_palette())
|
||||
theme_2.apply_syntax_palette(palette_id)
|
||||
|
||||
# Language mapping for ImGuiColorTextEdit
|
||||
self._lang_map = {
|
||||
"python": _get_language_id("python"),
|
||||
|
||||
Reference in New Issue
Block a user