class

Asciidoctor::PrettifyAdapter

Inherits Asciidoctor::SyntaxHighlighterBase < Reference < Object

Client-side syntax highlighter adapter for Google Code Prettify.

This adapter inserts the necessary CSS and JavaScript into the output document to enable client-side syntax highlighting using Google Code Prettify.

Ported from Ruby Asciidoctor lib/asciidoctor/syntax_highlighter/prettify.rb

Constants

CDN_BASE_URL = "https://cdnjs.cloudflare.com/ajax/libs/prettify"
PRETTIFY_VERSION = "r298"

Constructors

new(name : String = "prettify", backend : String = "html5")
Source

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.

Source
docinfo?(location : Symbol) : Bool

Indicates whether this syntax highlighter has docinfo (i.e., markup) to insert into the output document at the specified location.

Source
format(node : AbstractNode, lang : String | Nil, opts : Hash(Symbol, String) = {} of Symbol => String) : String

Format the highlighted source for inclusion in an HTML document.

Source