public class Formatter extends Object implements com.vladsch.flexmark.IRender
Start with the builder method to configure the renderer. Example:
HtmlRenderer renderer = HtmlRenderer.builder().escapeHtml(true).build();
renderer.render(node);
| Modifier and Type | Class and Description |
|---|---|
static class |
Formatter.Builder
Builder for configuring an
Formatter. |
static interface |
Formatter.FormatterExtension
Extension for
Formatter. |
| Modifier and Type | Field and Description |
|---|---|
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
APPEND_TRANSFERRED_REFERENCES |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.EqualizeTrailingMarker> |
ATX_HEADER_TRAILING_MARKER |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
BLOCK_QUOTE_BLANK_LINES |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.BlockQuoteMarker> |
BLOCK_QUOTE_MARKERS |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.mappers.CharWidthProvider> |
CHAR_WIDTH_PROVIDER
Deprecated.
use FORMAT_ prefixed name
|
static com.vladsch.flexmark.util.options.DataKey<Integer> |
FENCED_CODE_MARKER_LENGTH |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.CodeFenceMarker> |
FENCED_CODE_MARKER_TYPE |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
FENCED_CODE_MATCH_CLOSING_MARKER |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
FENCED_CODE_MINIMIZE_INDENT |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
FENCED_CODE_SPACE_BEFORE_INFO |
static int |
FORMAT_ALL_OPTIONS |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.mappers.CharWidthProvider> |
FORMAT_CHAR_WIDTH_PROVIDER |
static int |
FORMAT_COLLAPSE_WHITESPACE |
static int |
FORMAT_CONVERT_TABS |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
FORMAT_FLAGS
output control for FormattingAppendable, see
FormattingAppendable.setOptions(int) |
static int |
FORMAT_SUPPRESS_TRAILING_WHITESPACE |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.TableCaptionHandling> |
FORMAT_TABLE_CAPTION |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.DiscretionaryText> |
FORMAT_TABLE_CAPTION_SPACES |
static com.vladsch.flexmark.util.options.DataKey<String> |
FORMAT_TABLE_INDENT_PREFIX |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.parser.ParserEmulationProfile> |
FORMATTER_EMULATION_PROFILE |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
INDENTED_CODE_MINIMIZE_INDENT |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
KEEP_EXPLICIT_LINKS_AT_START |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
KEEP_HARD_LINE_BREAKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
KEEP_IMAGE_LINKS_AT_START |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
KEEP_SOFT_LINE_BREAKS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
LIST_ADD_BLANK_LINE_BEFORE |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListBulletMarker> |
LIST_BULLET_MARKER |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListNumberedMarker> |
LIST_NUMBERED_MARKER |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
LIST_REMOVE_EMPTY_ITEMS |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
LIST_RENUMBER_ITEMS |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListSpacing> |
LIST_SPACING |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
MAX_BLANK_LINES |
static com.vladsch.flexmark.util.options.DataKey<Integer> |
MAX_TRAILING_BLANK_LINES |
static Iterable<? extends com.vladsch.flexmark.ast.Node> |
NULL_ITERABLE |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacement> |
REFERENCE_PLACEMENT |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacementSort> |
REFERENCE_SORT |
static com.vladsch.flexmark.util.options.DataKey<Boolean> |
SETEXT_HEADER_EQUALIZE_MARKER |
static com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.DiscretionaryText> |
SPACE_AFTER_ATX_MARKER |
static com.vladsch.flexmark.util.options.DataKey<String> |
THEMATIC_BREAK |
static com.vladsch.flexmark.util.options.DataKey<String> |
TRANSLATION_EXCLUDE_PATTERN |
static com.vladsch.flexmark.util.options.DataKey<String> |
TRANSLATION_HTML_BLOCK_PREFIX |
static com.vladsch.flexmark.util.options.DataKey<String> |
TRANSLATION_HTML_BLOCK_TAG_PATTERN |
static com.vladsch.flexmark.util.options.DataKey<String> |
TRANSLATION_HTML_INLINE_TAG_PATTERN |
static com.vladsch.flexmark.util.options.DataKey<String> |
TRANSLATION_ID_FORMAT |
| Modifier and Type | Method and Description |
|---|---|
static Formatter.Builder |
builder()
Create a new builder for configuring an
Formatter. |
static Formatter.Builder |
builder(com.vladsch.flexmark.util.options.DataHolder options)
Create a new builder for configuring an
Formatter. |
com.vladsch.flexmark.util.options.DataHolder |
getOptions() |
TranslationHandler |
getTranslationHandler() |
TranslationHandler |
getTranslationHandler(com.vladsch.flexmark.html.renderer.HtmlIdGeneratorFactory idGeneratorFactory) |
TranslationHandler |
getTranslationHandler(TranslationHandlerFactory translationHandlerFactory,
com.vladsch.flexmark.html.renderer.HtmlIdGeneratorFactory idGeneratorFactory) |
String |
render(com.vladsch.flexmark.ast.Node node)
Render the tree of nodes to markdown
|
void |
render(com.vladsch.flexmark.ast.Node node,
Appendable output)
Render a node to the appendable
|
void |
render(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines)
Render a node to the appendable
|
void |
translationRender(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines,
TranslationHandler translationHandler,
RenderPurpose renderPurpose)
Render a node to the appendable
|
void |
translationRender(com.vladsch.flexmark.ast.Node node,
Appendable output,
TranslationHandler translationHandler,
RenderPurpose renderPurpose)
Render a node to the appendable
|
String |
translationRender(com.vladsch.flexmark.ast.Node node,
TranslationHandler translationHandler,
RenderPurpose renderPurpose)
Render the tree of nodes to markdown
|
Formatter |
withOptions(com.vladsch.flexmark.util.options.DataHolder options) |
public static final com.vladsch.flexmark.util.options.DataKey<Integer> FORMAT_FLAGS
FormattingAppendable.setOptions(int)public static final int FORMAT_CONVERT_TABS
public static final int FORMAT_COLLAPSE_WHITESPACE
public static final int FORMAT_SUPPRESS_TRAILING_WHITESPACE
public static final int FORMAT_ALL_OPTIONS
public static final com.vladsch.flexmark.util.options.DataKey<Integer> MAX_BLANK_LINES
public static final com.vladsch.flexmark.util.options.DataKey<Integer> MAX_TRAILING_BLANK_LINES
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.DiscretionaryText> SPACE_AFTER_ATX_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> SETEXT_HEADER_EQUALIZE_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.EqualizeTrailingMarker> ATX_HEADER_TRAILING_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<String> THEMATIC_BREAK
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> BLOCK_QUOTE_BLANK_LINES
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.BlockQuoteMarker> BLOCK_QUOTE_MARKERS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> INDENTED_CODE_MINIMIZE_INDENT
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> FENCED_CODE_MINIMIZE_INDENT
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> FENCED_CODE_MATCH_CLOSING_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> FENCED_CODE_SPACE_BEFORE_INFO
public static final com.vladsch.flexmark.util.options.DataKey<Integer> FENCED_CODE_MARKER_LENGTH
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.CodeFenceMarker> FENCED_CODE_MARKER_TYPE
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> LIST_ADD_BLANK_LINE_BEFORE
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> LIST_RENUMBER_ITEMS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> LIST_REMOVE_EMPTY_ITEMS
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListBulletMarker> LIST_BULLET_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListNumberedMarker> LIST_NUMBERED_MARKER
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ListSpacing> LIST_SPACING
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacement> REFERENCE_PLACEMENT
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.ElementPlacementSort> REFERENCE_SORT
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> KEEP_IMAGE_LINKS_AT_START
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> KEEP_EXPLICIT_LINKS_AT_START
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.mappers.CharWidthProvider> FORMAT_CHAR_WIDTH_PROVIDER
@Deprecated public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.mappers.CharWidthProvider> CHAR_WIDTH_PROVIDER
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.TableCaptionHandling> FORMAT_TABLE_CAPTION
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.util.format.options.DiscretionaryText> FORMAT_TABLE_CAPTION_SPACES
public static final com.vladsch.flexmark.util.options.DataKey<String> FORMAT_TABLE_INDENT_PREFIX
public static final com.vladsch.flexmark.util.options.DataKey<com.vladsch.flexmark.parser.ParserEmulationProfile> FORMATTER_EMULATION_PROFILE
public static final com.vladsch.flexmark.util.options.DataKey<String> TRANSLATION_ID_FORMAT
public static final com.vladsch.flexmark.util.options.DataKey<String> TRANSLATION_HTML_BLOCK_PREFIX
public static final com.vladsch.flexmark.util.options.DataKey<String> TRANSLATION_EXCLUDE_PATTERN
public static final com.vladsch.flexmark.util.options.DataKey<String> TRANSLATION_HTML_BLOCK_TAG_PATTERN
public static final com.vladsch.flexmark.util.options.DataKey<String> TRANSLATION_HTML_INLINE_TAG_PATTERN
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> KEEP_HARD_LINE_BREAKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> KEEP_SOFT_LINE_BREAKS
public static final com.vladsch.flexmark.util.options.DataKey<Boolean> APPEND_TRANSFERRED_REFERENCES
public static final Iterable<? extends com.vladsch.flexmark.ast.Node> NULL_ITERABLE
public TranslationHandler getTranslationHandler(TranslationHandlerFactory translationHandlerFactory, com.vladsch.flexmark.html.renderer.HtmlIdGeneratorFactory idGeneratorFactory)
public TranslationHandler getTranslationHandler(com.vladsch.flexmark.html.renderer.HtmlIdGeneratorFactory idGeneratorFactory)
public TranslationHandler getTranslationHandler()
public com.vladsch.flexmark.util.options.DataHolder getOptions()
getOptions in interface com.vladsch.flexmark.IRenderpublic static Formatter.Builder builder()
Formatter.public static Formatter.Builder builder(com.vladsch.flexmark.util.options.DataHolder options)
Formatter.options - initialization optionspublic void render(com.vladsch.flexmark.ast.Node node,
Appendable output)
render in interface com.vladsch.flexmark.IRendernode - node to renderoutput - appendable to use for the outputpublic void render(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines)
node - node to renderoutput - appendable to use for the outputpublic String render(com.vladsch.flexmark.ast.Node node)
render in interface com.vladsch.flexmark.IRendernode - the root nodepublic void translationRender(com.vladsch.flexmark.ast.Node node,
Appendable output,
TranslationHandler translationHandler,
RenderPurpose renderPurpose)
node - node to renderoutput - appendable to use for the outputpublic void translationRender(com.vladsch.flexmark.ast.Node node,
Appendable output,
int maxTrailingBlankLines,
TranslationHandler translationHandler,
RenderPurpose renderPurpose)
node - node to renderoutput - appendable to use for the outputpublic String translationRender(com.vladsch.flexmark.ast.Node node, TranslationHandler translationHandler, RenderPurpose renderPurpose)
node - the root nodepublic Formatter withOptions(com.vladsch.flexmark.util.options.DataHolder options)
withOptions in interface com.vladsch.flexmark.IRenderCopyright © 2018. All rights reserved.