From 06e8b8e0227bf5321b61815a2823bf026d3d825c Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 23 Feb 2025 17:01:49 -0800 Subject: [PATCH] Keep KaTeX css files Signed-off-by: Danila Fedorin --- convert.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/convert.rb b/convert.rb index 61e9163..e3875df 100644 --- a/convert.rb +++ b/convert.rb @@ -69,9 +69,12 @@ files.each do |file| end # If we didn't find any mathematical equations, no need to include KaTeX CSS. - unless found_any - document.css('link[href$="katex.css"], link[href$="katex.min.css"]').each(&:remove) - end + # Disabled here because Bergamot technically doesn't require math blocks + # on the page but does need the CSS. + # + # unless found_any + # document.css('link[href$="katex.css"], link[href$="katex.min.css"]').each(&:remove) + # end File.write(file, document.to_html(encoding: 'UTF-8')) end