Class: Metanorma::Standoc::DateInlineMacro

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



82
83
84
85
86
# File 'lib/metanorma/standoc/macros_inline.rb', line 82

def process(_parent, _target, attrs)
  format = "%F"
  attrs.size >= 2 and format = attrs[2]
  %{<date format='#{format}' value='#{attrs[1]}'/>}
end