nbformat icon indicating copy to clipboard operation
nbformat copied to clipboard

How do I set syntax highlighting style in API Use

Open hno2 opened this issue 3 years ago • 0 comments

Hey everyone,

quick question: How do I set a custom syntax hightlighting style, when using nbformat via API. Configuring it that way has no effect:


c = Config()
c.CSSHTMLHeaderPreprocessor.style = "monokai" # Should set different style
html_exporter = HTMLExporter(config=c)
(body, _) = html_exporter.from_notebook_node( nbformat.reads(content))

I couldn't find something in the Documentation only for CLI use.

Thanks in Advance!

hno2 avatar Aug 06 '21 11:08 hno2