Highlighter

interface Highlighter

A highlighter defines a mapping from highlighting tags to style strings.

Functions

Link copied to clipboard
open fun scope(node: NodeType): Boolean

When given, the highlighter will only apply to trees whose top node type passes this predicate.

Link copied to clipboard
abstract fun style(tags: List<Tag>): String?

Get the style string for the given set of tags, or null.