mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Revert some redundant changes
This commit is contained in:
parent
ced9fef2dc
commit
f61f17d524
@ -241,10 +241,10 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
candidates = [path.join(dir, self.config.language,
|
candidates = [path.join(dir, self.config.language,
|
||||||
'LC_MESSAGES', 'sphinx.js')
|
'LC_MESSAGES', 'sphinx.js')
|
||||||
for dir in self.config.locale_dirs] + \
|
for dir in self.config.locale_dirs] + \
|
||||||
[path.join(package_dir, 'locale', self.config.language,
|
[path.join(package_dir, 'locale', self.config.language,
|
||||||
'LC_MESSAGES', 'sphinx.js'),
|
'LC_MESSAGES', 'sphinx.js'),
|
||||||
path.join(sys.prefix, 'share/sphinx/locale',
|
path.join(sys.prefix, 'share/sphinx/locale',
|
||||||
self.config.language, 'sphinx.js')]
|
self.config.language, 'sphinx.js')]
|
||||||
|
|
||||||
for jsfile in candidates:
|
for jsfile in candidates:
|
||||||
if path.isfile(jsfile):
|
if path.isfile(jsfile):
|
||||||
@ -264,18 +264,20 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
|
|
||||||
def init_highlighter(self) -> None:
|
def init_highlighter(self) -> None:
|
||||||
# determine Pygments style and create the highlighter
|
# determine Pygments style and create the highlighter
|
||||||
style = 'sphinx'
|
|
||||||
if self.config.pygments_style is not None:
|
if self.config.pygments_style is not None:
|
||||||
style = self.config.pygments_style
|
style = self.config.pygments_style
|
||||||
elif self.theme:
|
elif self.theme:
|
||||||
style = self.theme.get_config('theme', 'pygments_style', 'none')
|
style = self.theme.get_config('theme', 'pygments_style', 'none')
|
||||||
|
else:
|
||||||
|
style = 'sphinx'
|
||||||
self.highlighter = PygmentsBridge('html', style)
|
self.highlighter = PygmentsBridge('html', style)
|
||||||
|
|
||||||
dark_style = None
|
|
||||||
if self.config.html_pygments_dark_style is not None:
|
if self.config.html_pygments_dark_style is not None:
|
||||||
dark_style = self.config.pygments_dark_style
|
dark_style = self.config.pygments_dark_style
|
||||||
elif self.theme:
|
elif self.theme:
|
||||||
dark_style = self.theme.get_config('theme', 'pygments_dark_style', 'none')
|
dark_style = self.theme.get_config('theme', 'pygments_dark_style', 'none')
|
||||||
|
else:
|
||||||
|
dark_style = None
|
||||||
|
|
||||||
if dark_style is not None:
|
if dark_style is not None:
|
||||||
self.dark_highlighter = PygmentsBridge('html', dark_style)
|
self.dark_highlighter = PygmentsBridge('html', dark_style)
|
||||||
|
Loading…
Reference in New Issue
Block a user