Skip to content
ConsoleMonster

API Reference

Interface

ITextHighlighter

Namespace ConsoleMonster.Highlighting
Assembly ConsoleMonster
Modifiers abstract

Turns text into tokens with highlight roles. Text between tokens is plain. Implementations read the text as literal characters (never markup) and must finish in time linear in its length; register one with Highlighters.Register to add a language.

Usage

Explore 11 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 5

Methods

public abstract IReadOnlyList<HighlightToken> Tokenize(String text) #
Returns: IReadOnlyList<HighlightToken>

Tokenizes text.

Parameters

text System.String requiredposition: 0
The text (any line endings).

Returns

The tokens, in order and not overlapping.

Properties

public abstract String Name { get; } #

The language name, for example "json" (lower case).