Show More
@@ -21,6 +21,8 b' from IPython.utils import path' | |||
|
21 | 21 | |
|
22 | 22 | from .activatable import ActivatableTransformer |
|
23 | 23 | |
|
24 | from IPython.utils.traitlets import Unicode | |
|
25 | ||
|
24 | 26 | #----------------------------------------------------------------------------- |
|
25 | 27 | # Classes and functions |
|
26 | 28 | #----------------------------------------------------------------------------- |
@@ -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