use of com.vladsch.flexmark.ast.Node in project flexmark-java by vsch.
the class TextCollectingVisitorTest method test_inline_code.
@Test
public void test_inline_code() {
Parser parser = Parser.builder().build();
Node document = parser.parse("Test text `inline code`");
TextCollectingVisitor collectingVisitor = new TextCollectingVisitor();
final String text = collectingVisitor.collectAndGetText(document);
assertEquals("Test text inline code", text);
}
use of com.vladsch.flexmark.ast.Node in project nzbhydra2 by theotherp.
the class Markdown method renderMarkdownAsHtml.
public static String renderMarkdownAsHtml(String markdown) {
MutableDataSet options = new MutableDataSet();
Parser parser = Parser.builder(options).build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();
Node document = parser.parse(markdown);
return renderer.render(document);
}
Aggregations