Skip to main content

Module syntax

Module syntax 

Source

Structs§

CodeBlockState
Where highlighting of a code block got to — enough to continue it later with byte-identical output, so a streaming block can highlight only its new lines instead of the whole block again.
HighlightStats
Work the highlighter did since the last SyntaxHighlighter::take_stats. Byte counters measure input re-processed rather than output produced: a caller that re-highlights a growing block every frame shows up as the whole block’s size again and again, whatever the output looks like.
SyntaxHighlighter

Type Aliases§

HighlightedLines
Highlighted lines, shared rather than copied out of the cache: a hit on a long code block would otherwise clone every line of it.