Class: Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Inherits:
-
Asciidoctor::Extensions::BlockMacroProcessor
- Object
- Asciidoctor::Extensions::BlockMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlEaDiagramBlockMacro
- Includes:
- LutamlDiagramBase, LutamlEaXmiBase
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb
Constant Summary
Constants included from LutamlEaXmiBase
Metanorma::Plugin::Lutaml::LutamlEaXmiBase::DEFAULT_RENDER_INCLUDE, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::LIQUID_INCLUDE_PATH, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::RENDER_STYLES_INCLUDES, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::RENDER_STYLE_ATTRIBUTE, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::SUPPORTED_NESTED_MACRO, Metanorma::Plugin::Lutaml::LutamlEaXmiBase::XMI_INDEX_REGEXP
Instance Method Summary collapse
Methods included from LutamlDiagramBase
Instance Method Details
#process(parent, _target, attrs) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/metanorma/plugin/lutaml/lutaml_ea_diagram_block_macro.rb', line 15 def process(parent, _target, attrs) orig_doc = get_original_document(parent, attrs["index"]) diagram = fetch_diagram_by_name(orig_doc, attrs) 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 |