Package org.commonmark.renderer.text
Class TextContentRenderer.RendererContext
java.lang.Object
org.commonmark.renderer.text.TextContentRenderer.RendererContext
- All Implemented Interfaces:
TextContentNodeRendererContext
- Enclosing class:
TextContentRenderer
private class TextContentRenderer.RendererContext
extends Object
implements TextContentNodeRendererContext
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionControls how line breaks should be rendered, seeLineBreakRendering
.void
Render the specified node and its children using the configured renderers.boolean
-
Field Details
-
textContentWriter
-
nodeRendererMap
-
-
Constructor Details
-
RendererContext
-
-
Method Details
-
lineBreakRendering
Description copied from interface:TextContentNodeRendererContext
Controls how line breaks should be rendered, seeLineBreakRendering
.- Specified by:
lineBreakRendering
in interfaceTextContentNodeRendererContext
-
stripNewlines
public boolean stripNewlines()- Specified by:
stripNewlines
in interfaceTextContentNodeRendererContext
- Returns:
- true for stripping new lines and render text as "single line", false for keeping all line breaks.
-
getWriter
- Specified by:
getWriter
in interfaceTextContentNodeRendererContext
- Returns:
- the writer to use
-
render
Description copied from interface:TextContentNodeRendererContext
Render the specified node and its children using the configured renderers. This should be used to render child nodes; be careful not to pass the node that is being rendered, that would result in an endless loop.- Specified by:
render
in interfaceTextContentNodeRendererContext
- Parameters:
node
- the node to render
-