Sha256: 0f30c5cbfca0d3645ee2b03d9ca2d630d12aacc02717e18eb27090a2c053101c
Contents?: true
Size: 1.03 KB
Versions: 45
Compression:
Stored size: 1.03 KB
Contents
# ------------------------------------------------------------------------------ # ~/_plugins/asciidoctor-extensions/conum.rb # Asciidoctor extension for conums # # Product/Info: # https://jekyll.one # # Copyright (C) 2023 Juergen Adams # # J1 Theme is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # # ------------------------------------------------------------------------------ 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
45 entries across 45 versions & 1 rubygems