Asciidoctor::SyntaxHighlighterBase
Abstract base class for syntax highlighter implementations.
Constructors
Instance methods
docinfo(location : Symbol, doc : Document, opts : Hash(Symbol, String) = {} of Symbol => String) : String
Generates docinfo markup for this syntax highlighter to insert at the specified location in the output document.
Indicates whether this syntax highlighter has docinfo (i.e., markup) to insert into the output document at the specified location.
format(node : AbstractNode, lang : String | Nil, opts : Hash(Symbol, String) = {} of Symbol => String) : String
Format the highlighted source for inclusion in an HTML document.
highlight(node : AbstractNode, source : String, lang : String, opts : Hash(Symbol, String) = {} of Symbol => String) : String
Highlights the specified source when this source block is being converted.
highlight?
Indicates whether highlighting is handled by this syntax highlighter or by the client.
Writes the stylesheet to support the highlighted source(s) to disk.
Macros
register_for(*names)
Register this syntax highlighter class for the given names in the default registry.