Expand description
Syntax highlighting module for terminal display.
Provides the Syntax struct for rendering syntax-highlighted code with
line numbers, themes, word wrap, and padding. Uses syntect for syntax
highlighting (analogous to the use of Pygments).
Structs§
- Syntax
- Syntax-highlighted code display.
Enums§
- Padding
Spec - Shorthand input for
unpack_padding— accepts the same forms as CSSpadding: a single value, two values (vertical, horizontal), three values (top, horizontal, bottom), or four values (top, right, bottom, left). - Syntax
Error - Errors that can occur during syntax operations.
Functions§
- unpack_
padding - Expand a
PaddingSpecinto a(top, right, bottom, left)tuple, matching rich v14.1.0’sPadding.unpackand the CSSpaddingshorthand convention.