Closed ghost closed 3 years ago
@DaveJarvis, I will add it to the to do list but at the moment no PanDoc specific profile or extensions are implemented so it may take a while to add this extension along with other PanDoc specific ones.
Should anybody need this functionality, attached are a few classes that may help.
Here's a short example usage:
final var extensions = new ArrayList<Extension>();
extensions.add( FencedDivExtension.create() );
final IParse parser = Parser.builder().extensions( extensions ).build();
final IRender renderer = HtmlRenderer.builder().extensions( extensions ).build();
This solution works for nested fenced div elements, although it may be suboptimal because the opening and closing div
elements are written separately, without knowledge of each other. If a Markdown document is missing the closing :::
then the resulting HTML document will be missing a closing div
.
If you have questions, you may be best off asking on StackOverflow.
@DaveJarvis please add a pr...
@XenoAmess, a PR probably won't happen. If I were to make a flexmark extension at all, it'd be for parsing citations and cross-references, not for fenced DIVs. Here's the latest source code for fenced DIVs as is integrated into my text editor:
Pandoc now has a DIV syntax for content blocks. For example:
Using the latest version of Pandoc, the above produces:
This would be great to see in FlexMark as well.