Sha256: edfae78838e55ff21994cfda01d2f3740a2c7cce37b02e171b57dad1ef2395be
Contents?: true
Size: 1.03 KB
Versions: 64
Compression:
Stored size: 1.03 KB
Contents
# ------------------------------------------------------------------------------ # ~/_plugins/asciidoctor-extensions/conum.rb # Asciidoctor extension for conums # # Product/Info: # https://jekyll.one # # Copyright (C) 2021 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # # ------------------------------------------------------------------------------ require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' include Asciidoctor # A inline macro that embeds a conum into the output document # # Usage # ------------------------------------------------------------------------------ # conum::<num>[] # # Example: # # conum:1[] # # ------------------------------------------------------------------------------ Asciidoctor::Extensions.register do inline_macro do named :conum process do |parent, target, attrs| # TODO validate that this conum is valid Asciidoctor::Inline.new(parent, :callout, target.to_i).convert end end end
Version data entries
64 entries across 64 versions & 1 rubygems