Class: Metanorma::Plugin::Lutaml::LutamlFigureInlineMacro
- Inherits:
-
Asciidoctor::Extensions::InlineMacroProcessor
- Object
- Asciidoctor::Extensions::InlineMacroProcessor
- Metanorma::Plugin::Lutaml::LutamlFigureInlineMacro
- Includes:
- LutamlDiagramBase
- Defined in:
- lib/metanorma/plugin/lutaml/lutaml_figure_inline_macro.rb
Instance Method Summary collapse
Methods included from LutamlDiagramBase
Instance Method Details
#process(parent, _target, attrs) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/metanorma/plugin/lutaml/lutaml_figure_inline_macro.rb', line 12 def process(parent, _target, attrs) diagram_key = [attrs["package"], attrs["name"]].compact.join(":") return if parent.document.attributes["lutaml_figure_id"].nil? xmi_id = parent.document.attributes["lutaml_figure_id"][diagram_key] return unless xmi_id %(<xref target="figure-#{xmi_id}"></xref>) end |