Class BlockProcessor

java.lang.Object
org.asciidoctor.extension.BaseProcessor
org.asciidoctor.extension.BlockProcessor
All Implemented Interfaces:
Processor

public abstract class BlockProcessor extends BaseProcessor
  • Field Details

    • CONTEXTS

      @Deprecated public static final String CONTEXTS
      Deprecated.
      Please use Contexts.KEY
      This value is used as the config option key when defining the block type a Processor should process. Its value must be a list of String constants:

      Example to make a BlockProcessor work on listings and examples named foo:

       
       Map<String, Object> config = new HashMap<>();
       config.put(CONTEXTS, Arrays.asList(EXAMPLE, LISTING));
       BlockProcessor blockProcessor = new BlockProcessor("foo", config);
       asciidoctor.javaExtensionRegistry().block(blockProcessor);
       
       

      See Also:
    • CONTEXT_OPEN

      @Deprecated public static final String CONTEXT_OPEN
      Deprecated.
      Please use Contexts.OPEN
      Predefined constant for making a BlockProcessor work on open blocks. When passed with the CONTEXTS config option this BlockProcessor works on open blocks:
       [foo]
       --
       An open block can be an anonymous container,
       or it can masquerade as any other block.
       --
       
      See Also:
    • CONTEXT_EXAMPLE

      @Deprecated public static final String CONTEXT_EXAMPLE
      Deprecated.
      Please use Contexts.EXAMPLE
      Predefined constant for making a BlockProcessor work on example blocks. When passed with the CONTEXTS config option this BlockProcessor works on example blocks:
       [foo]
       ====
       This is just a neat example.
       ====
       
      See Also:
    • CONTEXT_SIDEBAR

      @Deprecated public static final String CONTEXT_SIDEBAR
      Deprecated.
      Please use Contexts.SIDEBAR
      Predefined constant for making a BlockProcessor work on sidebar blocks. When passed with the CONTEXTS config option this BlockProcessor works on sidebar blocks:
       [foo]
       ****
       This is just a sidebar.
       ****
       
      See Also:
    • CONTEXT_LITERAL

      @Deprecated public static final String CONTEXT_LITERAL
      Deprecated.
      Please use Contexts.LITERAL
      Predefined constant for making a BlockProcessor work on literal blocks. When passed with the CONTEXTS config option this BlockProcessor works on literal blocks:
       [foo]
       ....
       This is just a literal block.
       ....
       
      See Also:
    • CONTEXT_LISTING

      @Deprecated public static final String CONTEXT_LISTING
      Deprecated.
      Please use Contexts.LISTING
      Predefined constant for making a BlockProcessor work on source blocks. When passed with the CONTEXTS config option this BlockProcessor works on source blocks:
       [foo]
       ....
       This is just a literal block.
       ....
       
      See Also:
    • CONTEXT_QUOTE

      @Deprecated public static final String CONTEXT_QUOTE
      Deprecated.
      Please use Contexts.QUOTE
      Predefined constant for making a BlockProcessor work on quote blocks. When passed with the CONTEXTS config option this BlockProcessor works on quote blocks:
       [foo]
       ____
       To be or not to be...
       ____
       
      See Also:
    • CONTEXT_PASS

      @Deprecated public static final String CONTEXT_PASS
      Deprecated.
      Please use Contexts.PASS
      Predefined constant for making a BlockProcessor work on passthrough blocks. When passed with the CONTEXTS config option this BlockProcessor works on passthrough blocks:
       [foo]
       ++++
       <h1>Big text</h1>
       ++++
       
      See Also:
    • CONTEXT_PARAGRAPH

      @Deprecated public static final String CONTEXT_PARAGRAPH
      Deprecated.
      Predefined constant for making a BlockProcessor work on paragraph blocks. This is also the default for the CONTEXTS config option if no other context is given. When passed with the CONTEXTS config option this BlockProcessor works on paragraph blocks:
       [foo]
       Please process this paragraph.
      
       And don't process this.
       
      See Also:
    • name

      protected String name
  • Constructor Details

    • BlockProcessor

      public BlockProcessor()
    • BlockProcessor

      public BlockProcessor(String name)
    • BlockProcessor

      public BlockProcessor(String name, Map<String,Object> config)
  • Method Details