Guidedog / 文档
0.2.0
highlight/guidedoc¶
Package highlight_guidedoc connects the highlight library to Guidedoc’s renderers. It is separate so that the highlight library itself depends on nothing but Odin’s core.
Procedures
- guidedoc.highlighter :: proc() -> gd.Highlighter¶
-
highlighter is the value for Render_Options.highlighter: code blocks become the HTML Pygments writes for Sphinx, with its short CSS classes.
- guidedoc.typst_highlighter :: proc() -> gd.Highlighter¶
-
typst_highlighter is for a Typst renderer that draws code with Guidedog’s colours rather than Typst’s: it writes code as write_typst’s array of lines, for the book template’s gd-highlight function (see the README). It returns false for plain text and languages it does not know, so the renderer can keep Typst’s own raw block for those.