This commit is contained in:
2025-06-14 08:28:02 +09:00
parent a4114c5be3
commit bb6d51a602
7 changed files with 197 additions and 12 deletions

View File

@ -88,10 +88,11 @@ impl MarkdownProcessor {
let parser = Parser::new_ext(content, options);
let mut html_output = String::new();
let mut code_block = None;
let theme = self.theme_set.themes.get(&self.highlight_theme)
.or_else(|| self.theme_set.themes.get("Monokai"))
.or_else(|| self.theme_set.themes.get("InspiredGitHub"))
// Force use dark theme for better visibility on dark background
let theme = self.theme_set.themes.get("base16-monokai.dark")
.or_else(|| self.theme_set.themes.get("base16-ocean.dark"))
.or_else(|| self.theme_set.themes.get("Solarized (dark)"))
.or_else(|| self.theme_set.themes.get(&self.highlight_theme))
.unwrap_or_else(|| self.theme_set.themes.values().next().unwrap());
let mut events = Vec::new();