Class AbbreviationNodeFormatter
- java.lang.Object
-
- com.vladsch.flexmark.formatter.NodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
- com.vladsch.flexmark.ext.abbreviation.internal.AbbreviationNodeFormatter
-
- All Implemented Interfaces:
NodeFormatter,PhasedNodeFormatter
public class AbbreviationNodeFormatter extends NodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbbreviationNodeFormatter.Factory
-
Field Summary
Fields Modifier and Type Field Description static DataKey<java.util.Map<java.lang.String,java.lang.String>>ABBREVIATION_TRANSLATION_MAPstatic DataKey<java.util.Map<java.lang.String,java.lang.String>>ABBREVIATION_UNIQUIFICATION_MAPprivate booleanmakeMergedAbbreviationsUniqueprivate AbbreviationFormatOptionsoptionsprivate booleantransformUnderscores-
Fields inherited from class com.vladsch.flexmark.formatter.NodeRepositoryFormatter
FORMATTING_PHASES, lastReference, myComparator, recheckUndefinedReferences, referenceList, referenceRepository, referenceUniqificationMap, repositoryNodesDone, unusedReferences
-
-
Constructor Summary
Constructors Constructor Description AbbreviationNodeFormatter(DataHolder options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.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.@Nullable java.util.Set<NodeFormattingHandler<?>>getNodeFormattingHandlers()ElementPlacementgetReferencePlacement()ElementPlacementSortgetReferenceSort()AbbreviationRepositorygetRepository(DataHolder options)protected booleanmakeReferencesUnique()Whether references should be made uniquejava.lang.StringmodifyTransformedReference(java.lang.String transformedText, NodeFormatterContext context)private voidrender(AbbreviationBlock node, NodeFormatterContext context, MarkdownWriter markdown)private voidrender(Abbreviation node, NodeFormatterContext context, MarkdownWriter markdown)voidrenderReferenceBlock(AbbreviationBlock node, NodeFormatterContext context, MarkdownWriter markdown)-
Methods inherited from class com.vladsch.flexmark.formatter.NodeRepositoryFormatter
getFormattingPhases, getReferenceComparator, getTranslationReferencePlacement, renderDocument, renderReference, transformReferenceId, uniquifyIds
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.formatter.NodeFormatter
getBlockQuoteLikePrefixChar
-
-
-
-
Field Detail
-
ABBREVIATION_TRANSLATION_MAP
public static final DataKey<java.util.Map<java.lang.String,java.lang.String>> ABBREVIATION_TRANSLATION_MAP
-
ABBREVIATION_UNIQUIFICATION_MAP
public static final DataKey<java.util.Map<java.lang.String,java.lang.String>> ABBREVIATION_UNIQUIFICATION_MAP
-
options
private final AbbreviationFormatOptions options
-
transformUnderscores
private final boolean transformUnderscores
-
makeMergedAbbreviationsUnique
private final boolean makeMergedAbbreviationsUnique
-
-
Constructor Detail
-
AbbreviationNodeFormatter
public AbbreviationNodeFormatter(DataHolder options)
-
-
Method Detail
-
makeReferencesUnique
protected boolean makeReferencesUnique()
Description copied from class:NodeRepositoryFormatterWhether references should be made unique- Overrides:
makeReferencesUniquein classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>- Returns:
- true if yes, false if leave all references as is
-
getRepository
public AbbreviationRepository getRepository(DataHolder options)
- Specified by:
getRepositoryin classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
getReferencePlacement
public ElementPlacement getReferencePlacement()
- Specified by:
getReferencePlacementin classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
getReferenceSort
public ElementPlacementSort getReferenceSort()
- Specified by:
getReferenceSortin classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
modifyTransformedReference
public java.lang.String modifyTransformedReference(java.lang.String transformedText, NodeFormatterContext context)- Overrides:
modifyTransformedReferencein classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
renderReferenceBlock
public void renderReferenceBlock(AbbreviationBlock node, NodeFormatterContext context, MarkdownWriter markdown)
- Specified by:
renderReferenceBlockin classNodeRepositoryFormatter<AbbreviationRepository,AbbreviationBlock,Abbreviation>
-
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:NodeFormatterCollect 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.
-
render
private void render(AbbreviationBlock node, NodeFormatterContext context, MarkdownWriter markdown)
-
render
private void render(Abbreviation node, NodeFormatterContext context, MarkdownWriter markdown)
-
-