Skip to main content

HighlightResult

interface HighlightResult 

Describes the result of a highlight operation.

Properties

color

color: nullstring

The color of the code at the given index.


skipAhead

skipAhead: number

The number of characters to skip ahead.

This should be used to skip to the end of the currently highlighted token. The returned style will be used for the skipped characters, and they will be drawn as one continuous string keeping emojis and ligatures intact.

The returned value is the number of characters to skip ahead, not the index of the end of the token.