Switch to JavaScript syntax highlighter

This commit is contained in:
Victor Zverovich 2024-06-01 08:04:55 -07:00
parent d2ecfcfc45
commit aafdde7ef8
2 changed files with 11 additions and 1 deletions

3
doc/fmt.js Normal file
View File

@ -0,0 +1,3 @@
document$.subscribe(() => {
hljs.highlightAll()
})

View File

@ -13,17 +13,24 @@ theme:
- navigation.tabs
- toc.integrate
extra_javascript:
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js
- fmt.js
extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css
- fmt.css
markdown_extensions:
- pymdownx.highlight:
# Use JavaScript syntax highlighter instead of Pygments because it
# automatically applies to code blocks extracted through Doxygen.
use_pygments: false
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
plugins:
- mkdocstrings: