From dd85574e803bb5e9416be66696acc1a6f91f3470 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Mon, 15 May 2023 09:47:47 +0200 Subject: [PATCH] Use the reference HtmlFormatter class defined on PygmentsBridge. (#657) --- src/furo/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/furo/__init__.py b/src/furo/__init__.py index 7f64f1ad..460615da 100644 --- a/src/furo/__init__.py +++ b/src/furo/__init__.py @@ -352,8 +352,8 @@ def get_pygments_stylesheet() -> str: There is no way to tell Sphinx how the theme handles dark mode; at this time. """ - light_formatter = HtmlFormatter(style=_KNOWN_STYLES_IN_USE["light"]) - dark_formatter = HtmlFormatter(style=_KNOWN_STYLES_IN_USE["dark"]) + light_formatter = PygmentsBridge.html_formatter(style=_KNOWN_STYLES_IN_USE["light"]) + dark_formatter = PygmentsBridge.html_formatter(style=_KNOWN_STYLES_IN_USE["dark"]) lines: List[str] = []