Class CoreNodeFormatter
- java.lang.Object
-
- com.vladsch.flexmark.formatter.NodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
- com.vladsch.flexmark.formatter.internal.CoreNodeFormatter
-
- All Implemented Interfaces:
NodeFormatter
,PhasedNodeFormatter
public class CoreNodeFormatter extends NodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoreNodeFormatter.Factory
-
Field Summary
Fields Modifier and Type Field Description static DataKey<java.util.Map<java.lang.String,java.lang.String>>
ATTRIBUTE_UNIQUIFICATION_ID_MAP
Deprecated.static DataKey<java.util.Map<java.lang.String,java.lang.String>>
UNIQUIFICATION_MAP
Deprecated.static DataKey<java.lang.Boolean>
UNWRAPPED_AUTO_LINKS
static DataKey<java.util.HashSet<java.lang.String>>
UNWRAPPED_AUTO_LINKS_MAP
-
Fields inherited from class com.vladsch.flexmark.formatter.NodeRepositoryFormatter
FORMATTING_PHASES, lastReference, myComparator, recheckUndefinedReferences, referenceList, referenceRepository, referenceUniqificationMap, repositoryNodesDone, unusedReferences
-
-
Constructor Summary
Constructors Constructor Description CoreNodeFormatter(DataHolder options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getBlockQuoteLikePrefixChar()
Return character which compacts like block quote prefixjava.util.Set<java.lang.Class<?>>
getNodeClasses()
Collect nodes of given type so that they can be quickly accessed without traversing the AST by all formatting extensions.java.util.Set<NodeFormattingHandler<?>>
getNodeFormattingHandlers()
ElementPlacement
getReferencePlacement()
ElementPlacementSort
getReferenceSort()
ReferenceRepository
getRepository(DataHolder options)
void
renderDocument(NodeFormatterContext context, MarkdownWriter markdown, Document document, FormattingPhase phase)
Render the specified node.void
renderReferenceBlock(Reference node, NodeFormatterContext context, MarkdownWriter markdown)
-
Methods inherited from class com.vladsch.flexmark.formatter.NodeRepositoryFormatter
getFormattingPhases, getReferenceComparator, getTranslationReferencePlacement, makeReferencesUnique, modifyTransformedReference, renderReference, transformReferenceId, uniquifyIds
-
-
-
-
Field Detail
-
UNIQUIFICATION_MAP
@Deprecated public static final DataKey<java.util.Map<java.lang.String,java.lang.String>> UNIQUIFICATION_MAP
Deprecated.2020-04-10
-
ATTRIBUTE_UNIQUIFICATION_ID_MAP
@Deprecated public static final DataKey<java.util.Map<java.lang.String,java.lang.String>> ATTRIBUTE_UNIQUIFICATION_ID_MAP
Deprecated.2020-04-10
-
UNWRAPPED_AUTO_LINKS
public static final DataKey<java.lang.Boolean> UNWRAPPED_AUTO_LINKS
-
UNWRAPPED_AUTO_LINKS_MAP
public static final DataKey<java.util.HashSet<java.lang.String>> UNWRAPPED_AUTO_LINKS_MAP
-
-
Constructor Detail
-
CoreNodeFormatter
public CoreNodeFormatter(DataHolder options)
-
-
Method Detail
-
getBlockQuoteLikePrefixChar
public char getBlockQuoteLikePrefixChar()
Description copied from interface:NodeFormatter
Return character which compacts like block quote prefix- Returns:
- character or NUL if none
-
getNodeFormattingHandlers
@Nullable public java.util.Set<NodeFormattingHandler<?>> getNodeFormattingHandlers()
- Returns:
- the mapping of nodes this renderer handles to rendering function
-
getNodeClasses
@Nullable public java.util.Set<java.lang.Class<?>> getNodeClasses()
Description copied from interface:NodeFormatter
Collect nodes of given type so that they can be quickly accessed without traversing the AST by all formatting extensions.- Returns:
- the nodes of interest to this formatter during formatting.
-
getRepository
public ReferenceRepository getRepository(DataHolder options)
- Specified by:
getRepository
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
getReferencePlacement
public ElementPlacement getReferencePlacement()
- Specified by:
getReferencePlacement
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
getReferenceSort
public ElementPlacementSort getReferenceSort()
- Specified by:
getReferenceSort
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
renderReferenceBlock
public void renderReferenceBlock(Reference node, NodeFormatterContext context, MarkdownWriter markdown)
- Specified by:
renderReferenceBlock
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
renderDocument
public void renderDocument(@NotNull NodeFormatterContext context, @NotNull MarkdownWriter markdown, @NotNull Document document, @NotNull FormattingPhase phase)
Description copied from interface:PhasedNodeFormatter
Render the specified node.- Specified by:
renderDocument
in interfacePhasedNodeFormatter
- Overrides:
renderDocument
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
- 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 ofFormattingPhase
exceptFormattingPhase.DOCUMENT
because this phase is used for the non-phased node rendering
-
-