module Asciidoctor::SyntaxHighlighter

Public: A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing.

There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. This adapter type must define a highlight? method that returns true. The companion highlight method will then be called to handle the :specialcharacters substitution for source blocks. The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). This adapter type must define a docinfo? method that returns true. The companion docinfo method will then be called to insert markup into the output document. The docinfo functionality is available to both adapter types.

Asciidoctor provides several built-in adapters, including coderay, pygments, rouge, highlight.js, html-pipeline, and prettify. Additional adapters can be registered using SyntaxHighlighter.register or by supplying a custom factory.