highlight
kyo.Ansi.highlight
object highlight
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
highlight.type
Members list
Value members
Concrete methods
Applies syntax highlighting to a code snippet with optional header and trailer.
Applies syntax highlighting to a code snippet with optional header and trailer.
Value parameters
- code
-
The main code snippet to be highlighted.
- header
-
The header text to be displayed before the code (optional).
- startLine
-
The starting line number for the code snippet (default is 1).
- trailer
-
The trailer text to be displayed after the code (optional).
Attributes
- Returns
-
A string with the highlighted code, including line numbers and formatting.
Applies syntax highlighting to a code snippet without header or trailer.
Applies syntax highlighting to a code snippet without header or trailer.
Value parameters
- code
-
The code snippet to be highlighted.
Attributes
- Returns
-
A string with the highlighted code, including line numbers and formatting.
In this article