Check existence of dark highlighter

This commit is contained in:
Septatrix 2020-03-08 17:20:15 +01:00
parent 6041e7a15f
commit da5f5078e1
2 changed files with 6 additions and 2 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.pythonPath": ".venv/bin/python3"
}

View File

@ -740,8 +740,9 @@ class StandaloneHTMLBuilder(Builder):
with open(path.join(self.outdir, '_static', 'pygments.css'), 'w') as f:
f.write(self.highlighter.get_stylesheet())
with open(path.join(self.outdir, '_static', 'pygments_dark.css'), 'w') as f:
f.write(self.dark_highlighter.get_stylesheet())
if self.dark_hightlighter:
with open(path.join(self.outdir, '_static', 'pygments_dark.css'), 'w') as f:
f.write(self.dark_highlighter.get_stylesheet())
def create_pygments_aux_style_files(self) -> None:
"""create a style file for pygments."""