From 36a62b019f5d9798c938f612dd92ff04455356f8 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Sun, 14 May 2023 21:34:52 +0200 Subject: [PATCH] Use the reference HtmlFormatter class defined on PygmentsBridge. --- 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] = []