Class AttributesExtension
- java.lang.Object
-
- com.vladsch.flexmark.ext.attributes.AttributesExtension
-
- All Implemented Interfaces:
Formatter.FormatterExtension
,HtmlRenderer.HtmlRendererExtension
,RendererExtension
,Parser.ParserExtension
,Extension
public class AttributesExtension extends java.lang.Object implements Parser.ParserExtension, RendererExtension, HtmlRenderer.HtmlRendererExtension, Formatter.FormatterExtension
Extension for attributesCreate it with
create()
and then configure it on the buildersThe parsed attributes text is turned into
AttributesNode
nodes.
-
-
Field Summary
Fields Modifier and Type Field Description static DataKey<java.lang.Boolean>
ASSIGN_TEXT_ATTRIBUTES
static DataKey<KeepType>
ATTRIBUTES_KEEP
static DataKey<FencedCodeAddType>
FENCED_CODE_ADD_ATTRIBUTES
static DataKey<java.lang.Boolean>
FENCED_CODE_INFO_ATTRIBUTES
static DataKey<AttributeImplicitName>
FORMAT_ATTRIBUTE_CLASS
static DataKey<DiscretionaryText>
FORMAT_ATTRIBUTE_EQUAL_SPACE
static DataKey<AttributeImplicitName>
FORMAT_ATTRIBUTE_ID
static DataKey<AttributeValueQuotes>
FORMAT_ATTRIBUTE_VALUE_QUOTES
static DataKey<java.lang.Boolean>
FORMAT_ATTRIBUTES_COMBINE_CONSECUTIVE
static DataKey<java.lang.Boolean>
FORMAT_ATTRIBUTES_SORT
static DataKey<DiscretionaryText>
FORMAT_ATTRIBUTES_SPACES
static DataKey<NodeAttributeRepository>
NODE_ATTRIBUTES
static DataKey<java.lang.Boolean>
USE_EMPTY_IMPLICIT_AS_SPAN_DELIMITER
static DataKey<java.lang.Boolean>
WRAP_NON_ATTRIBUTE_TEXT
-
Fields inherited from interface com.vladsch.flexmark.util.misc.Extension
EMPTY_LIST
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AttributesExtension
create()
void
extend(Formatter.Builder formatterBuilder)
void
extend(HtmlRenderer.Builder htmlRendererBuilder, java.lang.String rendererType)
Called to give each extension to register extension points that it containsvoid
extend(RendererBuilder rendererBuilder, java.lang.String rendererType)
Called to give each extension to register extension points that it containsvoid
extend(Parser.Builder parserBuilder)
This method is called on all extensions so that they can register their custom processorsvoid
parserOptions(MutableDataHolder options)
This method is called first on all extensions so that they can adjust the options that must be common to all extensions.void
rendererOptions(MutableDataHolder options)
This method is called first on all extensions so that they can adjust the options that must be common to all extensions.
-
-
-
Field Detail
-
NODE_ATTRIBUTES
public static final DataKey<NodeAttributeRepository> NODE_ATTRIBUTES
-
ASSIGN_TEXT_ATTRIBUTES
public static final DataKey<java.lang.Boolean> ASSIGN_TEXT_ATTRIBUTES
-
FENCED_CODE_INFO_ATTRIBUTES
public static final DataKey<java.lang.Boolean> FENCED_CODE_INFO_ATTRIBUTES
-
FENCED_CODE_ADD_ATTRIBUTES
public static final DataKey<FencedCodeAddType> FENCED_CODE_ADD_ATTRIBUTES
-
WRAP_NON_ATTRIBUTE_TEXT
public static final DataKey<java.lang.Boolean> WRAP_NON_ATTRIBUTE_TEXT
-
USE_EMPTY_IMPLICIT_AS_SPAN_DELIMITER
public static final DataKey<java.lang.Boolean> USE_EMPTY_IMPLICIT_AS_SPAN_DELIMITER
-
FORMAT_ATTRIBUTES_COMBINE_CONSECUTIVE
public static final DataKey<java.lang.Boolean> FORMAT_ATTRIBUTES_COMBINE_CONSECUTIVE
-
FORMAT_ATTRIBUTES_SORT
public static final DataKey<java.lang.Boolean> FORMAT_ATTRIBUTES_SORT
-
FORMAT_ATTRIBUTES_SPACES
public static final DataKey<DiscretionaryText> FORMAT_ATTRIBUTES_SPACES
-
FORMAT_ATTRIBUTE_EQUAL_SPACE
public static final DataKey<DiscretionaryText> FORMAT_ATTRIBUTE_EQUAL_SPACE
-
FORMAT_ATTRIBUTE_VALUE_QUOTES
public static final DataKey<AttributeValueQuotes> FORMAT_ATTRIBUTE_VALUE_QUOTES
-
FORMAT_ATTRIBUTE_ID
public static final DataKey<AttributeImplicitName> FORMAT_ATTRIBUTE_ID
-
FORMAT_ATTRIBUTE_CLASS
public static final DataKey<AttributeImplicitName> FORMAT_ATTRIBUTE_CLASS
-
-
Method Detail
-
create
public static AttributesExtension create()
-
parserOptions
public void parserOptions(MutableDataHolder options)
Description copied from interface:Parser.ParserExtension
This method is called first on all extensions so that they can adjust the options that must be common to all extensions.- Specified by:
parserOptions
in interfaceParser.ParserExtension
- Parameters:
options
- option set that will be used for the builder
-
extend
public void extend(Parser.Builder parserBuilder)
Description copied from interface:Parser.ParserExtension
This method is called on all extensions so that they can register their custom processors- Specified by:
extend
in interfaceParser.ParserExtension
- Parameters:
parserBuilder
- parser builder with which to register extensions- See Also:
Parser.Builder.customBlockParserFactory(CustomBlockParserFactory)
,Parser.Builder.customInlineParserExtensionFactory(InlineParserExtensionFactory)
,Parser.Builder.customInlineParserFactory(InlineParserFactory)
,Parser.Builder.customDelimiterProcessor(DelimiterProcessor)
,Parser.Builder.postProcessorFactory(PostProcessorFactory)
,Parser.Builder.paragraphPreProcessorFactory(ParagraphPreProcessorFactory)
,Parser.Builder.blockPreProcessorFactory(BlockPreProcessorFactory)
,Parser.Builder.linkRefProcessorFactory(LinkRefProcessorFactory)
,Parser.Builder.specialLeadInHandler(SpecialLeadInHandler)
-
extend
public void extend(Formatter.Builder formatterBuilder)
- Specified by:
extend
in interfaceFormatter.FormatterExtension
-
rendererOptions
public void rendererOptions(@NotNull MutableDataHolder options)
Description copied from interface:RendererExtension
This method is called first on all extensions so that they can adjust the options that must be common to all extensions.- Specified by:
rendererOptions
in interfaceFormatter.FormatterExtension
- Specified by:
rendererOptions
in interfaceHtmlRenderer.HtmlRendererExtension
- Specified by:
rendererOptions
in interfaceRendererExtension
- Parameters:
options
- option set that will be used for the builder
-
extend
public void extend(@NotNull HtmlRenderer.Builder htmlRendererBuilder, @NotNull java.lang.String rendererType)
Description copied from interface:HtmlRenderer.HtmlRendererExtension
Called to give each extension to register extension points that it contains- Specified by:
extend
in interfaceHtmlRenderer.HtmlRendererExtension
- Parameters:
htmlRendererBuilder
- builder to call back for extension point registrationrendererType
- type of rendering being performed. For now "HTML", "JIRA" or "YOUTRACK"- See Also:
HtmlRenderer.Builder.attributeProviderFactory(AttributeProviderFactory)
,HtmlRenderer.Builder.nodeRendererFactory(NodeRendererFactory)
,HtmlRenderer.Builder.linkResolverFactory(LinkResolverFactory)
,HtmlRenderer.Builder.htmlIdGeneratorFactory(HeaderIdGeneratorFactory)
-
extend
public void extend(@NotNull RendererBuilder rendererBuilder, @NotNull java.lang.String rendererType)
Description copied from interface:RendererExtension
Called to give each extension to register extension points that it contains- Specified by:
extend
in interfaceRendererExtension
- Parameters:
rendererBuilder
- builder to call back for extension point registrationrendererType
- type of rendering being performed. For now "HTML", "JIRA" or "YOUTRACK"- See Also:
HtmlRenderer.Builder.attributeProviderFactory(AttributeProviderFactory)
,HtmlRenderer.Builder.linkResolverFactory(LinkResolverFactory)
,HtmlRenderer.Builder.htmlIdGeneratorFactory(HeaderIdGeneratorFactory)
-
-