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.private java.util.Map<java.lang.String,java.lang.String>
attributeUniquificationIdMap
private int
blankLines
(package private) FormatterOptions
formatterOptions
(package private) static TranslationPlaceholderGenerator
htmlEntityPlaceholderGenerator
private ListOptions
listOptions
private java.lang.String
myHtmlBlockPrefix
private java.lang.String
myHtmlInlinePrefix
private java.lang.String
myTranslationAutolinkPrefix
(package private) MutableDataHolder
myTranslationStore
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
-
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
-
formatterOptions
final FormatterOptions formatterOptions
-
listOptions
private final ListOptions listOptions
-
myHtmlBlockPrefix
private final java.lang.String myHtmlBlockPrefix
-
myHtmlInlinePrefix
private final java.lang.String myHtmlInlinePrefix
-
myTranslationAutolinkPrefix
private final java.lang.String myTranslationAutolinkPrefix
-
blankLines
private int blankLines
-
myTranslationStore
MutableDataHolder myTranslationStore
-
attributeUniquificationIdMap
private java.util.Map<java.lang.String,java.lang.String> attributeUniquificationIdMap
-
htmlEntityPlaceholderGenerator
static final TranslationPlaceholderGenerator htmlEntityPlaceholderGenerator
-
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 @Nullable java.util.Set<NodeFormattingHandler<?>> getNodeFormattingHandlers()
- Returns:
- the mapping of nodes this renderer handles to rendering function
-
getNodeClasses
@Nullable public @Nullable 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>
-
appendReference
void appendReference(java.lang.CharSequence id, NodeFormatterContext context, MarkdownWriter markdown)
-
renderReferenceBlock
public void renderReferenceBlock(Reference node, NodeFormatterContext context, MarkdownWriter markdown)
- Specified by:
renderReferenceBlock
in classNodeRepositoryFormatter<ReferenceRepository,Reference,RefNode>
-
renderDocument
public void renderDocument(@NotNull @NotNull NodeFormatterContext context, @NotNull @NotNull MarkdownWriter markdown, @NotNull @NotNull Document document, @NotNull @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
-
render
private void render(Node node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(BlankLine node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Document node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Heading node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(BlockQuote node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(ThematicBreak node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(FencedCodeBlock node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(IndentedCodeBlock node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(BulletList node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(OrderedList node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(BulletListItem node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(OrderedListItem node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Emphasis node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(StrongEmphasis node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Paragraph node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(SoftLineBreak node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HardLineBreak node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlEntity node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Text node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(TextBase node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Code node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlBlock node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlCommentBlock node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlBlockBase node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlInnerBlockComment node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlInline node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(HtmlInlineComment node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Reference node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(AutoLink node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(MailLink node, NodeFormatterContext context, MarkdownWriter markdown)
-
renderAutoLink
private void renderAutoLink(DelimitedLinkNode node, NodeFormatterContext context, MarkdownWriter markdown, java.lang.String prefix, java.lang.String suffix)
-
render
private void render(Image node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Link node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(ImageRef node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(LinkRef node, NodeFormatterContext context, MarkdownWriter markdown)
-
-