tools (common/template): always use highlight.css if present.

This commit is contained in:
Goffi 2019-03-25 18:40:11 +01:00
commit c83ac61e1d

View file

@ -560,7 +560,8 @@ class Renderer(object):
For each element of the path, a .css file is looked for in /static, and returned
if it exists.
Previous element are kept by replacing '/' with '_'.
styles_extra.css, styles.css and fonts.css are always used if they exist.
styles_extra.css, styles.css, highlight.css and fonts.css are always used if they
exist.
For each found file, if a file with the same name and "_noscript" suffix exists,
it will be return is second part of resulting tuple.
For instance, if template_data is (some_site, some_theme, blog/articles.html),
@ -589,7 +590,7 @@ class Renderer(object):
if css_path is not None:
css_files.append(self.getFrontURL(css_path))
for name_root in (u'styles', u'styles_extra'):
for name_root in (u'styles', u'styles_extra', u'highlight'):
self._appendCSSPaths(template_data, css_files, css_files_noscript, name_root)
for idx in xrange(len(path_elems)):