Sha256: 9d98cca6ff2c5e4f77efaeda5e028ac9be83a302b3a47fc6fb13e7f0730fd6b0
Contents?: true
Size: 539 Bytes
Versions: 28
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true require 'asciidoctor/extensions' module Asciidoctor module Iso # Macro to transform `term[X,Y]` into em, termxref xml class TermRefInlineMacro < Asciidoctor::Extensions::InlineMacroProcessor use_dsl named :term name_positional_attributes 'name', 'termxref' using_format :short def process(_parent, _target, attrs) termref = attrs['termxref'] || attrs['name'] "<em>#{attrs['name']}</em> (<termxref>#{termref}</termxref>)" end end end end
Version data entries
28 entries across 25 versions & 2 rubygems