Interface
ITextHighlighter
ConsoleMonster.Highlighting
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.
Returned or exposed by 6
- Method Highlighters.Detect
- Method Highlighters.ForPath
- Method Highlighters.Get
- Property Highlighters.Smart
- Property HighlightPresenter.Highlighter
- Property CodeView.Highlighter
Accepted by parameters 5
- Method Highlighters.Register
- Method HighlightStyles.ToLines
- Method HighlightStyles.ToMarkup
- Constructor HighlightPresenter.HighlightPresenter
- Constructor CodeView.CodeView
Methods
public abstract IReadOnlyList<HighlightToken> Tokenize(string text) #Tokenizes text.
Parameters
- text string
- The text (any line endings).
Properties
public abstract string Name { get; } #The language name, for example "json" (lower case).