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