Sha256: ad7983e0385afeadec35692fdaeb1d8d299330c7dc0c0face9fd4cfff9eca022
Contents?: true
Size: 646 Bytes
Versions: 20
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module Metanorma module Plugin module Lutaml class LutamlFigureInlineMacro < ::Asciidoctor::Extensions::InlineMacroProcessor include LutamlDiagramBase use_dsl named :lutaml_figure 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 end end end end
Version data entries
20 entries across 20 versions & 1 rubygems