Class AsciiDocToText
java.lang.Object
pro.verron.asciidoc.converters.AsciiDocToText
- All Implemented Interfaces:
Function<AsciiDocModel, String>
Converts an AsciiDocModel to a plain AsciiDoc text string.
Implements Function<AsciiDocModel, String> and renders headings,
paragraphs, lists, tables, blockquotes, code blocks, images, inline
elements (bold, italic, superscript, subscript, styled, links), and macros
into their AsciiDoc text representation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAsciiDocToText(boolean skipComments) Constructs a converter that optionally skips comment blocks. -
Method Summary
Modifier and TypeMethodDescriptionapply(AsciiDocModel model) Applies the conversion on the given AsciiDoc model and renders its blocks into a concatenated string representation.
-
Constructor Details
-
AsciiDocToText
public AsciiDocToText(boolean skipComments) Constructs a converter that optionally skips comment blocks.- Parameters:
skipComments- whether to omit comment blocks in the output
-
-
Method Details
-
apply
Applies the conversion on the given AsciiDoc model and renders its blocks into a concatenated string representation.- Specified by:
applyin interfaceFunction<AsciiDocModel, String>- Parameters:
model- the parsed AsciiDoc model- Returns:
- the rendered AsciiDoc text
-