Class: MermaidTreeProcessor
- Inherits:
-
Asciidoctor::Extensions::TreeProcessor
- Object
- Asciidoctor::Extensions::TreeProcessor
- MermaidTreeProcessor
- Defined in:
- lib/asciidoctor-mermaid/extension.rb
Instance Method Summary collapse
Instance Method Details
#process(document) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/asciidoctor-mermaid/extension.rb', line 7 def process(document) document.blocks.map! do |block| if block.respond_to?(:blocks) && !block.blocks.empty? process(block) elsif block.respond_to?(:attributes) && block.attributes['style'] === 'source' && block.attributes['language'] === 'mermaid' self.convert_block(block) else block end end document end |