Class: Metanorma::Standoc::PassFormatInlineMacro

Inherits:
Asciidoctor::Extensions::InlineMacroProcessor
  • Object
show all
Defined in:
lib/metanorma/standoc/macros_inline.rb

Instance Method Summary collapse

Instance Method Details

#process(parent, target, attrs) ⇒ Object



142
143
144
145
146
147
148
149
150
# File 'lib/metanorma/standoc/macros_inline.rb', line 142

def process(parent, target, attrs)
  format = target || "metanorma"
  out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"],
                                type: :pass, attributes: { "subs" => [] })
    .convert
  <<~XML.strip
    <passthrough-inline formats="#{format}">#{out}</passthrough-inline>
  XML
end