flexmark-java
flexmark-java copied to clipboard
need help ,table cell content line break break document
MutableDataSet options = new MutableDataSet();
options.setFrom(ParserEmulationProfile.MARKDOWN);
options.set(Parser.EXTENSIONS, Lists.newArrayList(com.vladsch.flexmark.ext.tables.TablesExtension.create()));
options.set(TablesExtension.FORMAT_TABLE_TRIM_CELL_WHITESPACE, true);
Parser parser = Parser.builder(options).build();
Node document = parser.parse(markdown);
List<String> paragraphs=new ArrayList<>();
for (Node node = document.getFirstChild(); node != null; node = node.getNext()) {
if (node instanceof Paragraph) {
paragraphs.add(node.getChars().toString());
}
if (node instanceof TableBlock) {
}
if table cell content contains two line break "\n", content after line break recognition as Paragraph