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

Version Path
metanorma-iso-1.5.13 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.12 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.11 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.10 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.9 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.8 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.7 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.6 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.5 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.4 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.3 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.2 lib/asciidoctor/iso/macros.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iso-1.5.1/lib/asciidoctor/iso/macros.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iso-1.4.3/lib/asciidoctor/iso/macros.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iso-1.4.2/lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.1 lib/asciidoctor/iso/macros.rb
metanorma-iso-1.5.0 lib/asciidoctor/iso/macros.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iso-1.4.2/lib/asciidoctor/iso/macros.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iso-1.4.3/lib/asciidoctor/iso/macros.rb
metanorma-iso-1.4.3 lib/asciidoctor/iso/macros.rb