Class: Asciidoctor::Standoc::TermRefInlineMacro

Inherits:
Extensions::InlineMacroProcessor
  • Object
show all
Defined in:
lib/asciidoctor/standoc/macros_terms.rb

Overview

Macro to transform ‘term` into em, termxref xml

Instance Method Summary collapse

Instance Method Details

#process(_parent, _target, attrs) ⇒ Object



46
47
48
49
# File 'lib/asciidoctor/standoc/macros_terms.rb', line 46

def process(_parent, _target, attrs)
  termref = attrs['termxref'] || attrs['name']
  "<em>#{attrs['name']}</em> (<termxref>#{termref}</termxref>)"
end