Search in sources :

Example 6 with Document

use of com.vladsch.flexmark.ast.Document in project flexmark-java by vsch.

the class Parser method parseReader.

/**
 * Parse the specified reader into a tree of nodes. The caller is responsible for closing the reader.
 * <p>
 * Note that this method is thread-safe (a new parser state is used for each invocation).
 *
 * @param input the reader to parse
 * @return the root node
 * @throws IOException when reading throws an exception
 */
public Document parseReader(Reader input) throws IOException {
    DocumentParser documentParser = new DocumentParser(options, blockParserFactories, paragraphPreProcessorFactories, blockPreProcessorDependencies, inlineParserFactory.inlineParser(options, specialCharacters, delimiterCharacters, delimiterProcessors, linkRefProcessors, inlineParserExtensionFactories));
    Document document = documentParser.parse(input);
    return postProcess(document);
}
Also used : DocumentParser(com.vladsch.flexmark.internal.DocumentParser) Document(com.vladsch.flexmark.ast.Document)

Aggregations

Document (com.vladsch.flexmark.ast.Document)6 DocumentParser (com.vladsch.flexmark.internal.DocumentParser)3 Node (com.vladsch.flexmark.ast.Node)2 HtmlRenderer (com.vladsch.flexmark.html.HtmlRenderer)2 Parser (com.vladsch.flexmark.parser.Parser)2 MutableDataHolder (com.vladsch.flexmark.util.options.MutableDataHolder)2 JekyllTag (com.vladsch.flexmark.ext.jekyll.tag.JekyllTag)1 DataHolder (com.vladsch.flexmark.util.options.DataHolder)1 MutableDataSet (com.vladsch.flexmark.util.options.MutableDataSet)1 HashMap (java.util.HashMap)1