Class: Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Includes:
- LutamlDiagramBase
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb
Instance Method Summary collapse
Methods included from LutamlDiagramBase
Instance Method Details
#process(parent, _target, attrs) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb', line 14 def process(parent, _target, attrs) orig_doc = get_original_document(parent) diagram = fetch_diagram_by_name(orig_doc, attrs["name"]) return if diagram.nil? through_attrs = generate_attrs(attrs) through_attrs["target"] = img_src_path(parent.document, attrs, diagram) through_attrs["title"] = diagram.name create_image_block(parent, through_attrs) end |