Class AbbreviationExtension

  • All Implemented Interfaces:
    com.vladsch.flexmark.formatter.Formatter.FormatterExtension, com.vladsch.flexmark.html.HtmlRenderer.HtmlRendererExtension, com.vladsch.flexmark.parser.Parser.ParserExtension, com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension, com.vladsch.flexmark.util.misc.Extension

    public class AbbreviationExtension
    extends Object
    implements com.vladsch.flexmark.parser.Parser.ParserExtension, com.vladsch.flexmark.html.HtmlRenderer.HtmlRendererExtension, com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension, com.vladsch.flexmark.formatter.Formatter.FormatterExtension
    Extension for adding abbreviations to markdown

    Create it with create() then configure builders

    The parsed abbreviations are turned into abbr tags by default or a links as an option by setting the USE_LINKS key to true in option used to create the Parser.Builder via Parser.builder(options)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.ext.abbreviation.internal.AbbreviationRepository> ABBREVIATIONS
      A DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document.
      static com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.ast.KeepType> ABBREVIATIONS_KEEP
      A DataKey that is used to set the behavior of the abbreviations repository when duplicates are defined.
      static com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacement> ABBREVIATIONS_PLACEMENT  
      static com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacementSort> ABBREVIATIONS_SORT  
      static com.vladsch.flexmark.util.data.DataKey<Boolean> MAKE_MERGED_ABBREVIATIONS_UNIQUE  
      static com.vladsch.flexmark.util.data.DataKey<Boolean> USE_LINKS
      A DataKey that is used to set the use links option when true, default is false and abbr tag will be used in the rendered HTML.
      • Fields inherited from interface com.vladsch.flexmark.util.misc.Extension

        EMPTY_LIST
    • Field Detail

      • ABBREVIATIONS_KEEP

        public static final com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.ast.KeepType> ABBREVIATIONS_KEEP
        A DataKey that is used to set the behavior of the abbreviations repository when duplicates are defined. KeepType
      • ABBREVIATIONS

        public static final com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.ext.abbreviation.internal.AbbreviationRepository> ABBREVIATIONS
        A DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document.
      • USE_LINKS

        public static final com.vladsch.flexmark.util.data.DataKey<Boolean> USE_LINKS
        A DataKey that is used to set the use links option when true, default is false and abbr tag will be used in the rendered HTML.
      • ABBREVIATIONS_PLACEMENT

        public static final com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacement> ABBREVIATIONS_PLACEMENT
      • ABBREVIATIONS_SORT

        public static final com.vladsch.flexmark.util.data.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacementSort> ABBREVIATIONS_SORT
      • MAKE_MERGED_ABBREVIATIONS_UNIQUE

        public static final com.vladsch.flexmark.util.data.DataKey<Boolean> MAKE_MERGED_ABBREVIATIONS_UNIQUE
    • Constructor Detail

      • AbbreviationExtension

        public AbbreviationExtension()
    • Method Detail

      • extend

        public void extend​(com.vladsch.flexmark.formatter.Formatter.Builder formatterBuilder)
        Specified by:
        extend in interface com.vladsch.flexmark.formatter.Formatter.FormatterExtension
      • rendererOptions

        public void rendererOptions​(@NotNull
                                    @NotNull com.vladsch.flexmark.util.data.MutableDataHolder options)
        Specified by:
        rendererOptions in interface com.vladsch.flexmark.formatter.Formatter.FormatterExtension
        Specified by:
        rendererOptions in interface com.vladsch.flexmark.html.HtmlRenderer.HtmlRendererExtension
      • parserOptions

        public void parserOptions​(com.vladsch.flexmark.util.data.MutableDataHolder options)
        Specified by:
        parserOptions in interface com.vladsch.flexmark.parser.Parser.ParserExtension
      • transferReferences

        public boolean transferReferences​(com.vladsch.flexmark.util.data.MutableDataHolder document,
                                          com.vladsch.flexmark.util.data.DataHolder included)
        Specified by:
        transferReferences in interface com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension
      • extend

        public void extend​(com.vladsch.flexmark.parser.Parser.Builder parserBuilder)
        Specified by:
        extend in interface com.vladsch.flexmark.parser.Parser.ParserExtension
      • extend

        public void extend​(@NotNull
                           com.vladsch.flexmark.html.HtmlRenderer.Builder htmlRendererBuilder,
                           @NotNull
                           @NotNull String rendererType)
        Specified by:
        extend in interface com.vladsch.flexmark.html.HtmlRenderer.HtmlRendererExtension