API Reference
Interface
ITextHighlighter
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) #Returns:
IReadOnlyList<HighlightToken>Tokenizes text.
Parameters
- text System.String
- 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).