Class: Metanorma::Plugin::Plantuml::ImageBlockMacroProcessor
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Plantuml::ImageBlockMacroProcessor
- Includes:
- BlockProcessorBase
- Defined in:
- lib/metanorma/plugin/plantuml/image_block_macro_processor.rb
Overview
PlantUML block processor
Instance Method Summary collapse
Methods included from BlockProcessorBase
Instance Method Details
#process(parent, reader, attrs) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/metanorma/plugin/plantuml/image_block_macro_processor.rb', line 12 def process(parent, reader, attrs) # Check for document-level disable flag if parent.document.attr("plantuml-disabled") return abort(parent, reader, attrs, "PlantUML processing disabled") end # Check PlantUML availability explicitly unless Backend.plantuml_available? return abort(parent, reader, attrs, "PlantUML not installed") end # Parse format specifications formats = parse_formats(attrs, parent.document) = (parent, reader, attrs) process_image_block(parent, reader, attrs, formats, ) rescue StandardError => e abort(parent, reader, attrs, e.) end |