##// END OF EJS Templates
Merge pull request #3516 from jakevdp/configurable_highlight...
Matthias Bussonnier -
r11142:2cfee8d6 merge
parent child Browse files
Show More
@@ -20,6 +20,8 b' from pygments.formatters import HtmlFormatter'
20 20 from IPython.utils import path
21 21
22 22 from .activatable import ActivatableTransformer
23
24 from IPython.utils.traitlets import Unicode
23 25
24 26 #-----------------------------------------------------------------------------
25 27 # Classes and functions
@@ -33,6 +35,9 b' class CSSHTMLHeaderTransformer(ActivatableTransformer):'
33 35
34 36 header = []
35 37
38 highlight_class = Unicode('.highlight', config=True,
39 help="CSS highlight class identifier")
40
36 41 def __init__(self, config=None, **kw):
37 42 """
38 43 Public constructor
@@ -97,7 +102,8 b' class CSSHTMLHeaderTransformer(ActivatableTransformer):'
97 102 pass
98 103
99 104 #Add pygments CSS
100 pygments_css = HtmlFormatter().get_style_defs('.highlight')
105 formatter = HtmlFormatter()
106 pygments_css = formatter.get_style_defs(self.highlight_class)
101 107 header.append(pygments_css)
102 108
103 109 #Set header
General Comments 0
You need to be logged in to leave comments. Login now