Revert some redundant changes

This commit is contained in:
Septatrix 2020-03-08 16:20:58 +01:00
parent ced9fef2dc
commit f61f17d524

View File

@ -264,18 +264,20 @@ class StandaloneHTMLBuilder(Builder):
def init_highlighter(self) -> None:
# determine Pygments style and create the highlighter
style = 'sphinx'
if self.config.pygments_style is not None:
style = self.config.pygments_style
elif self.theme:
style = self.theme.get_config('theme', 'pygments_style', 'none')
else:
style = 'sphinx'
self.highlighter = PygmentsBridge('html', style)
dark_style = None
if self.config.html_pygments_dark_style is not None:
dark_style = self.config.pygments_dark_style
elif self.theme:
dark_style = self.theme.get_config('theme', 'pygments_dark_style', 'none')
else:
dark_style = None
if dark_style is not None:
self.dark_highlighter = PygmentsBridge('html', dark_style)