Pygments: Fix styles override.

This fixes #119.
This commit is contained in:
Alexandre Vicenzi 2018-06-24 00:01:22 -03:00
parent 65cc7b24c9
commit 82daaf6e52
123 changed files with 3823 additions and 3767 deletions

View file

@ -19,13 +19,13 @@ def export():
opts = {
'style': style,
'noclasses': False,
'nobackground': False,
}
path = os.path.join(PYGMENTS_PATH, '%s.css' % style)
formatter = HtmlFormatter(**opts)
css_content = formatter.get_style_defs()
# little fix because pelican doesn't append background color.
css_content = css_content.replace('.hll', '.highlight')
css_content = formatter.get_style_defs('.highlight')
with open(path, 'w') as f:
f.write(css_content)