Class: Metanorma::Standoc::IndexRangeInlineMacro

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, attr) ⇒ Object



50
51
52
53
54
55
# File 'lib/metanorma/standoc/macros_inline.rb', line 50

def process(parent, target, attr)
  text = attr["text"]
  text = "((#{text}))" unless /^\(\(.+\)\)$/.match?(text)
  out = parent.sub_macros(text)
  out.sub("<index>", "<index to='#{target}'>")
end