Class KonceptInlineMacro

java.lang.Object
org.asciidoctor.extension.BaseProcessor
org.asciidoctor.extension.MacroProcessor<org.asciidoctor.ast.PhraseNode>
org.asciidoctor.extension.InlineMacroProcessor
network.ike.docs.koncept.KonceptInlineMacro
All Implemented Interfaces:
org.asciidoctor.extension.Processor

@Name("k") public class KonceptInlineMacro extends org.asciidoctor.extension.InlineMacroProcessor
AsciidoctorJ inline macro processor that handles k:ConceptName[] syntax in AsciiDoc documents.

Usage in AsciiDoc:

The patient presented with k:HeartFailure[] and k:AorticStenosis[].
A label override: k:HeartFailure[Congestive Heart Failure].

Each reference renders as the concept's Komet identicon — a LifeHash image byte-identical to what Komet draws — linked to the koncept's glossary entry, with the form chosen per backend:

  • html5 / CSS-PDF (Prince, AH, WeasyPrint): an inline <img> with a base64 data: URI.
  • docbook5 → FO (FOP/XEP): an <inlinemediaobject> referencing a generated PNG file.
  • pdf (Prawn): a native inline image node referencing the PNG.
When no identicon can be computed — the koncept has no resolvable PublicId, or :koncept-identicon: is false — each backend falls back to a text badge. The glossary is auto-generated by KonceptGlossaryProcessor.

All referenced koncepts are collected in a document-scoped registry for deduplication and glossary generation.

  • Field Summary

    Fields inherited from class org.asciidoctor.extension.InlineMacroProcessor

    REGEXP

    Fields inherited from class org.asciidoctor.extension.MacroProcessor

    name
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new inline macro processor instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.asciidoctor.ast.PhraseNode
    process(org.asciidoctor.ast.StructuralNode parent, String target, Map<String,Object> attributes)
     

    Methods inherited from class org.asciidoctor.extension.MacroProcessor

    getName, options, setName

    Methods inherited from class org.asciidoctor.extension.BaseProcessor

    createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createDocument, createList, createList, createList, createListItem, createListItem, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createSection, createSection, createSection, createSection, createSection, createTable, createTable, createTableCell, createTableCell, createTableCell, createTableCell, createTableColumn, createTableColumn, createTableRow, getConfig, log, newCursor, newCursor, newCursor, newReader, newReader, newReader, newReader, parseContent, setConfig, unwrap, updateConfig

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KonceptInlineMacro

      public KonceptInlineMacro()
      Creates a new inline macro processor instance.
  • Method Details

    • process

      public org.asciidoctor.ast.PhraseNode process(org.asciidoctor.ast.StructuralNode parent, String target, Map<String,Object> attributes)
      Specified by:
      process in class org.asciidoctor.extension.MacroProcessor<org.asciidoctor.ast.PhraseNode>