use of com.vladsch.flexmark.internal.DocumentParser in project flexmark-java by vsch.
the class Parser method parse.
/**
* Parse the specified input text into a tree of nodes.
* <p>
* Note that this method is thread-safe (a new parser state is used for each invocation).
*
* @param input the text to parse
* @return the root node
*/
public Document parse(BasedSequence input) {
DocumentParser documentParser = new DocumentParser(options, blockParserFactories, paragraphPreProcessorFactories, blockPreProcessorDependencies, inlineParserFactory.inlineParser(options, specialCharacters, delimiterCharacters, delimiterProcessors, linkRefProcessors, inlineParserExtensionFactories));
Document document = documentParser.parse(input);
return postProcess(document);
}
use of com.vladsch.flexmark.internal.DocumentParser in project flexmark-java by vsch.
the class Parser method parse.
/**
* Parse the specified input text into a tree of nodes.
* <p>
* Note that this method is thread-safe (a new parser state is used for each invocation).
*
* @param input the text to parse
* @return the root node
*/
public Document parse(String input) {
DocumentParser documentParser = new DocumentParser(options, blockParserFactories, paragraphPreProcessorFactories, blockPreProcessorDependencies, inlineParserFactory.inlineParser(options, specialCharacters, delimiterCharacters, delimiterProcessors, linkRefProcessors, inlineParserExtensionFactories));
Document document = documentParser.parse(CharSubSequence.of(input));
return postProcess(document);
}
use of com.vladsch.flexmark.internal.DocumentParser 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);
}
Aggregations