Class AttributesNodeFormatter
java.lang.Object
com.vladsch.flexmark.ext.attributes.internal.AttributesNodeFormatter
- All Implemented Interfaces:
ExplicitAttributeIdProvider, NodeFormatter, PhasedNodeFormatter
public class AttributesNodeFormatter
extends Object
implements PhasedNodeFormatter, ExplicitAttributeIdProvider
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExplicitId(@NotNull Node node, @Nullable String id, @NotNull NodeFormatterContext context, @NotNull MarkdownWriter markdown) Used by AttributesExtension to insert attributes for headings during merge(package private) static AttributeNodecombineAttributes(LinkedHashMap<String, AttributeNode> attributeNodes, AttributeNode attributeNode) static StringgetEncodedIdAttribute(String category, String categoryId, NodeFormatterContext context, MarkdownWriter markdown) private static StringgetEncodedIdAttribute(String category, String categoryId, NodeFormatterContext context, MarkdownWriter markdown, Map<String, String> attributeTranslationMap, Map<String, String> attributeTranslatedMap) private StringgetEncodedOriginalId(String attribute, NodeFormatterContext context) @Nullable Set<FormattingPhase> Collect nodes of given type so that they can be quickly accessed without traversing the AST by all formatting extensions.@Nullable Set<NodeFormattingHandler<?>> (package private) booleanhasNoIdAttribute(Node node) (package private) voidrender(AttributesNode node, NodeFormatterContext context, MarkdownWriter markdown) voidrenderDocument(@NotNull NodeFormatterContext context, @NotNull MarkdownWriter markdown, @NotNull Document document, @NotNull FormattingPhase phase) Render the specified node.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NodeFormatter
getBlockQuoteLikePrefixChar
-
Field Details
-
ATTRIBUTE_TRANSLATION_MAP
-
ATTRIBUTE_TRANSLATED_MAP
-
ATTRIBUTE_ORIGINAL_ID_MAP
-
PROCESSED_ATTRIBUTES
-
ATTRIBUTE_UNIQUIFICATION_ID_MAP
-
ATTRIBUTE_UNIQUIFICATION_CATEGORY_MAP
-
ATTRIBUTE_TRANSLATION_ID
-
attributeTranslationMap
-
attributeTranslatedMap
-
attributeOriginalIdMap
-
attributeUniquificationIdMap
-
attributeOriginalId
private int attributeOriginalId -
formatOptions
-
-
Constructor Details
-
AttributesNodeFormatter
-
-
Method Details
-
getNodeClasses
Description copied from interface:NodeFormatterCollect nodes of given type so that they can be quickly accessed without traversing the AST by all formatting extensions.- Specified by:
getNodeClassesin interfaceNodeFormatter- Returns:
- the nodes of interest to this formatter during formatting.
-
getFormattingPhases
- Specified by:
getFormattingPhasesin interfacePhasedNodeFormatter
-
addExplicitId
public void addExplicitId(@NotNull @NotNull Node node, @Nullable @Nullable String id, @NotNull @NotNull NodeFormatterContext context, @NotNull @NotNull MarkdownWriter markdown) Description copied from interface:ExplicitAttributeIdProviderUsed by AttributesExtension to insert attributes for headings during merge- Specified by:
addExplicitIdin interfaceExplicitAttributeIdProvider- Parameters:
node- nodeid- explicit idcontext- contextmarkdown- markdown writer
-
hasNoIdAttribute
-
renderDocument
public void renderDocument(@NotNull @NotNull NodeFormatterContext context, @NotNull @NotNull MarkdownWriter markdown, @NotNull @NotNull Document document, @NotNull @NotNull FormattingPhase phase) Description copied from interface:PhasedNodeFormatterRender the specified node.- Specified by:
renderDocumentin interfacePhasedNodeFormatter- Parameters:
context- node renderer context instancemarkdown- markdown writer instancedocument- the document node to renderphase- rendering phase for which to generate the output. Will be any ofFormattingPhaseexceptFormattingPhase.DOCUMENTbecause this phase is used for the non-phased node rendering
-
getNodeFormattingHandlers
- Specified by:
getNodeFormattingHandlersin interfaceNodeFormatter- Returns:
- the mapping of nodes this renderer handles to rendering function
-
getEncodedIdAttribute
public static String getEncodedIdAttribute(String category, String categoryId, NodeFormatterContext context, MarkdownWriter markdown) -
getEncodedIdAttribute
-
getEncodedOriginalId
-
render
-
combineAttributes
static AttributeNode combineAttributes(LinkedHashMap<String, AttributeNode> attributeNodes, AttributeNode attributeNode)
-