Class: Asciidoctor::Foodogsquared::Extensions::CtanInlineMacro
- Inherits:
-
Extensions::InlineMacroProcessor
- Object
- Extensions::InlineMacroProcessor
- Asciidoctor::Foodogsquared::Extensions::CtanInlineMacro
- Defined in:
- lib/asciidoctor/foodogsquared/extensions/package-indices-macro.rb
Instance Method Summary collapse
Instance Method Details
#process(parent, target, attrs) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/asciidoctor/foodogsquared/extensions/package-indices-macro.rb', line 14 def process(parent, target, attrs) doc = parent.document text = attrs['caption'] || target url = %(https://ctan.org/pkg/#{target}) doc.register :links, url create_anchor parent, text, type: :link, target: url end |