Package com.vladsch.flexmark.formatter
Class FormatterUtils
java.lang.Object
com.vladsch.flexmark.formatter.FormatterUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NullableDataKey
<ListSpacing> static final Function
<CharSequence, Pair<Integer, Integer>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendWhiteSpaceBetween
(MarkdownWriter markdown, Node prev, Node next, boolean preserve, boolean collapse, boolean collapseToEOL) static void
appendWhiteSpaceBetween
(MarkdownWriter markdown, BasedSequence prev, BasedSequence next, boolean preserve, boolean collapse, boolean collapseToEOL) static @NotNull String
getActualAdditionalPrefix
(BasedSequence contentChars, MarkdownWriter markdown) static @NotNull String
getAdditionalPrefix
(BasedSequence fromChars, BasedSequence toChars) static String
getBlockLikePrefix
(BlockQuoteLike node, NodeFormatterContext context, BlockQuoteMarker blockQuoteMarkers, @NotNull BasedSequence prefix) static BasedSequence
getSoftLineBreakSpan
(Node node) (package private) static boolean
hasLooseItems
(Iterable<Node> itemList) static boolean
isFollowedByBlankLine
(@Nullable Node node) static boolean
isLastOfItem
(@Nullable Node node) static boolean
isNotLastItem
(@Nullable Node node) static void
renderBlockQuoteLike
(BlockQuoteLike node, NodeFormatterContext context, MarkdownWriter markdown) static void
renderList
(ListBlock node, NodeFormatterContext context, MarkdownWriter markdown) static void
renderList
(ListBlock node, NodeFormatterContext context, MarkdownWriter markdown, List<Node> itemList) static void
renderListItem
(ListItem node, NodeFormatterContext context, MarkdownWriter markdown, ListOptions listOptions, BasedSequence markerSuffix, boolean addBlankLineLooseItems) static void
renderLooseItemParagraph
(Paragraph node, NodeFormatterContext context, MarkdownWriter markdown) static void
renderLooseParagraph
(Paragraph node, NodeFormatterContext context, MarkdownWriter markdown) static void
renderTextBlockParagraphLines
(Node node, NodeFormatterContext context, MarkdownWriter markdown) static CharSequence
stripSoftLineBreak
(CharSequence chars, CharSequence spaceChar)
-
Field Details
-
LIST_ITEM_NUMBER
-
FIRST_LIST_ITEM_CHILD
-
NULL_PADDING
-
LIST_ALIGN_NUMERIC
-
LIST_ITEM_SPACING
-
-
Constructor Details
-
FormatterUtils
public FormatterUtils()
-
-
Method Details
-
getBlockLikePrefix
public static String getBlockLikePrefix(BlockQuoteLike node, NodeFormatterContext context, BlockQuoteMarker blockQuoteMarkers, @NotNull @NotNull BasedSequence prefix) -
stripSoftLineBreak
-
getActualAdditionalPrefix
@NotNull public static @NotNull String getActualAdditionalPrefix(BasedSequence contentChars, MarkdownWriter markdown) -
getAdditionalPrefix
@NotNull public static @NotNull String getAdditionalPrefix(BasedSequence fromChars, BasedSequence toChars) -
getSoftLineBreakSpan
-
appendWhiteSpaceBetween
public static void appendWhiteSpaceBetween(MarkdownWriter markdown, Node prev, Node next, boolean preserve, boolean collapse, boolean collapseToEOL) -
appendWhiteSpaceBetween
public static void appendWhiteSpaceBetween(MarkdownWriter markdown, BasedSequence prev, BasedSequence next, boolean preserve, boolean collapse, boolean collapseToEOL) -
renderList
public static void renderList(ListBlock node, NodeFormatterContext context, MarkdownWriter markdown) -
renderList
public static void renderList(ListBlock node, NodeFormatterContext context, MarkdownWriter markdown, List<Node> itemList) -
renderLooseParagraph
public static void renderLooseParagraph(Paragraph node, NodeFormatterContext context, MarkdownWriter markdown) -
isFollowedByBlankLine
-
isNotLastItem
-
isLastOfItem
-
renderLooseItemParagraph
public static void renderLooseItemParagraph(Paragraph node, NodeFormatterContext context, MarkdownWriter markdown) -
hasLooseItems
-
renderListItem
public static void renderListItem(ListItem node, NodeFormatterContext context, MarkdownWriter markdown, ListOptions listOptions, BasedSequence markerSuffix, boolean addBlankLineLooseItems) -
renderTextBlockParagraphLines
public static void renderTextBlockParagraphLines(Node node, NodeFormatterContext context, MarkdownWriter markdown) -
renderBlockQuoteLike
public static void renderBlockQuoteLike(BlockQuoteLike node, NodeFormatterContext context, MarkdownWriter markdown)
-