Class EnumeratedReferenceLinkRefProcessor.Factory

java.lang.Object
com.vladsch.flexmark.ext.enumerated.reference.internal.EnumeratedReferenceLinkRefProcessor.Factory
All Implemented Interfaces:
LinkRefProcessorFactory, Function<Document,LinkRefProcessor>
Enclosing class:
EnumeratedReferenceLinkRefProcessor

public static class EnumeratedReferenceLinkRefProcessor.Factory extends Object implements LinkRefProcessorFactory
  • Constructor Details

    • Factory

      public Factory()
  • Method Details

    • apply

      @NotNull public @NotNull LinkRefProcessor apply(@NotNull @NotNull Document document)
      Description copied from interface: LinkRefProcessorFactory
      Create a link ref processor for the document
      Specified by:
      apply in interface Function<Document,LinkRefProcessor>
      Specified by:
      apply in interface LinkRefProcessorFactory
      Parameters:
      document - on which the processor will work
      Returns:
      link ref processor
    • getWantExclamationPrefix

      public boolean getWantExclamationPrefix(@NotNull @NotNull DataHolder options)
      Description copied from interface: LinkRefProcessorFactory
      Whether the image ref is desired, if not then ! will be stripped off the prefix and treated as plain text
      Specified by:
      getWantExclamationPrefix in interface LinkRefProcessorFactory
      Parameters:
      options - options
      Returns:
      true if ! is part of the desired element, false otherwise
    • getBracketNestingLevel

      public int getBracketNestingLevel(@NotNull @NotNull DataHolder options)
      Description copied from interface: LinkRefProcessorFactory
      Whether the element consists of nested [] inside the link ref. For example Wiki link [[]] processor would return 1 Only immediately nested [] are considered. [[ ]] is nesting 1, [ [ ]] is not considered

      When >0 then preview of next characters is used and if they will match then inner reference will not be created to allow outer one to match the desired element

      Specified by:
      getBracketNestingLevel in interface LinkRefProcessorFactory
      Parameters:
      options - options
      Returns:
      nesting level for references, >0 for nesting