Skip to content

Commit

Permalink
Add highlight_extra_classes to outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfrg committed Mar 19, 2023
1 parent b2c4ce1 commit 401ca0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions mkdocs_jupyter/nbconvert2.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ def custom_clean_html(element):
},
)

if highlight_extra_classes:
content = content.replace(
"jp-OutputArea-output",
f"jp-OutputArea-output {highlight_extra_classes}",
)
return content
return content


Expand Down
3 changes: 1 addition & 2 deletions mkdocs_jupyter/tests/mkdocs/material-with-nbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ nav:
plugins:
- mkdocs-jupyter:
include_source: true
highlight_extra_classes: "custom-css-classes"
include_requirejs: true
highlight_extra_classes: not-prose

markdown_extensions:
- toc:
Expand Down

0 comments on commit 401ca0d

Please sign in to comment.