Class: Asciidoctor::Rhrev::HtmlTreeprocessor
- Inherits:
-
Extensions::Treeprocessor
- Object
- Extensions::Treeprocessor
- Asciidoctor::Rhrev::HtmlTreeprocessor
- Defined in:
- lib/asciidoctor/rhrev/rhrev_html.rb
Overview
Treeprocessor to auto-inject revision history at document start
Instance Method Summary collapse
Instance Method Details
#process(document) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/asciidoctor/rhrev/rhrev_html.rb', line 53 def process document return document unless document.attr? 'rhrev' rhrev_value = document.attr('rhrev') return document if rhrev_value == 'macro' || rhrev_value == 'manual' # Insert rhrev block at the beginning of the document rhrev_block = create_block document, :rhrev, nil, {} document.blocks.unshift rhrev_block document end |