Top Description Fields Constructors Methods
com.vladsch.flexmark.ext.abbreviation

public Class AbbreviationExtension

extends Object
implements ParserExtension, HtmlRendererExtension, ReferenceHoldingExtension, FormatterExtension
Class Inheritance
All Implemented Interfaces
com.vladsch.flexmark.formatter.Formatter.FormatterExtension, com.vladsch.flexmark.util.misc.Extension, com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension, com.vladsch.flexmark.html.HtmlRenderer.HtmlRendererExtension, com.vladsch.flexmark.parser.Parser.ParserExtension
Imports
com.vladsch.flexmark.ext.abbreviation.internal.*, com.vladsch.flexmark.formatter.Formatter, com.vladsch.flexmark.html.HtmlRenderer, com.vladsch.flexmark.parser.Parser, com.vladsch.flexmark.util.ast.KeepType, com.vladsch.flexmark.util.data.DataHolder, .DataKey, .MutableDataHolder, com.vladsch.flexmark.util.format.options.ElementPlacement, .ElementPlacementSort, org.jetbrains.annotations.NotNull

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 AbbreviationExtension#USE_LINKS key to true in option used to create the Parser.Builder via Parser.builder(options)

Field Summary

Modifier and TypeField and Description
public static final DataKey<AbbreviationRepository>
ABBREVIATIONS

A DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document.

public static final DataKey<KeepType>
ABBREVIATIONS_KEEP

A DataKey that is used to set the behavior of the abbreviations repository when duplicates are defined.

public static final DataKey<ElementPlacement>
public static final DataKey<ElementPlacementSort>
public static final DataKey<Boolean>
public static final 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.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static AbbreviationExtension
public void
public void
extend(Parser.Builder
parser builder with which to register extensions
parserBuilder
)

Implements com.vladsch.flexmark.parser.Parser.ParserExtension.extend.

This method is called on all extensions so that they can register their custom processors

public void
extend(HtmlRenderer.Builder htmlRendererBuilder, @NotNull String rendererType)

public void
parserOptions(MutableDataHolder
option set that will be used for the builder
options
)

Implements com.vladsch.flexmark.parser.Parser.ParserExtension.parserOptions.

This method is called first on all extensions so that they can adjust the options that must be common to all extensions.

public void
rendererOptions(@NotNull MutableDataHolder
option set that will be used for the builder
options
)

Implements com.vladsch.flexmark.formatter.Formatter.FormatterExtension.rendererOptions.

This method is called first on all extensions so that they can adjust the options.

public boolean
transferReferences(MutableDataHolder
destination document for references
document
,
DataHolder
source document for references
included
)

Implements com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension.transferReferences.

This method is called to transfer references from included document to the source document

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ABBREVIATIONSback to summary
public static final DataKey<AbbreviationRepository> ABBREVIATIONS

A DataKey that is used to get the document's Node repository holding all the abbreviations defined in the current document.

ABBREVIATIONS_KEEPback to summary
public static final DataKey<KeepType> ABBREVIATIONS_KEEP

A DataKey that is used to set the behavior of the abbreviations repository when duplicates are defined. KeepType

ABBREVIATIONS_PLACEMENTback to summary
public static final DataKey<ElementPlacement> ABBREVIATIONS_PLACEMENT
ABBREVIATIONS_SORTback to summary
public static final DataKey<ElementPlacementSort> ABBREVIATIONS_SORT
MAKE_MERGED_ABBREVIATIONS_UNIQUEback to summary
public static final DataKey<Boolean> MAKE_MERGED_ABBREVIATIONS_UNIQUE

Constructor Detail

AbbreviationExtensionback to summary
public AbbreviationExtension()

Method Detail

createback to summary
public static AbbreviationExtension create()
extendback to summary
public void extend(Formatter.Builder formatterBuilder)

Implements com.vladsch.flexmark.formatter.Formatter.FormatterExtension.extend.

Annotations
@Override
extendback to summary
public void extend(Parser.Builder parserBuilder)

Implements com.vladsch.flexmark.parser.Parser.ParserExtension.extend.

Doc from com.vladsch.flexmark.parser.Parser.ParserExtension.extend.

This method is called on all extensions so that they can register their custom processors

Parameters
parserBuilder:Parser.Builder

parser builder with which to register extensions

Annotations
@Override
extendback to summary
public void extend(HtmlRenderer.Builder htmlRendererBuilder, @NotNull String rendererType)
Annotations
@Override
parserOptionsback to summary
public void parserOptions(MutableDataHolder options)

Implements com.vladsch.flexmark.parser.Parser.ParserExtension.parserOptions.

Doc from com.vladsch.flexmark.parser.Parser.ParserExtension.parserOptions.

This method is called first on all extensions so that they can adjust the options that must be common to all extensions.

Parameters
options:MutableDataHolder

option set that will be used for the builder

Annotations
@Override
rendererOptionsback to summary
public void rendererOptions(@NotNull MutableDataHolder options)

Implements com.vladsch.flexmark.formatter.Formatter.FormatterExtension.rendererOptions.

Doc from com.vladsch.flexmark.formatter.Formatter.FormatterExtension.rendererOptions.

This method is called first on all extensions so that they can adjust the options.

Parameters
options:@NotNull MutableDataHolder

option set that will be used for the builder

Annotations
@Override
transferReferencesback to summary
public boolean transferReferences(MutableDataHolder document, DataHolder included)

Implements com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension.transferReferences.

Doc from com.vladsch.flexmark.parser.Parser.ReferenceHoldingExtension.transferReferences.

This method is called to transfer references from included document to the source document

Parameters
document:MutableDataHolder

destination document for references

included:DataHolder

source document for references

Returns:boolean

true if there were references to transfer

Annotations
@Override