Java library for parsing and rendering CommonMark (Markdown)
MarkdownRenderer
for rendering nodes to Markdown (CommonMark)!
Note that while care is taken to produce equivalent Markdown, some differences
in the original Markdown (if parsed) are not preserved, such as:
Automatic-Module-Name
manifest entries were removedorg.commonmark.parser.beta
containing classes that are not part of
the stable API but are exported from the module because they might be useful for
extension parsersorg.commonmark.text
for text related utilities that are useful for
both parsing and renderingTableCell
now has getWidth
returning the number of dash and colon characters
in the delimiter row, useful for rendering proportional width tables (#296)ThematicBreak
now has getLiteral
containing the string that was used in the
source when parsing (#309)ListItem
now has getMarkerIndent
and getContentIndent
for retrieving the
space between the start of the line and the marker/contentBulletList
, OrderedList
, FencedCodeBlock
and replaced with nullable ones because they might not be set when constructing
these nodes manually instead of via parsingLinkReferenceDefinition
having null SourceSpan
when title is present
and parsing with source spans option enabled (#310)StrikethroughExtension
can now be
configured to require two tildes like before, see Javadoc. (#271)textarea
to list of literal HTML block tags.
Like script
, style
, and pre
, textarea
blocks can contain
blank lines without the contents being interpreted as commonmark.ẞ
and SS
should match)LinkReferenceDefinition
.
Before, we used to store the normalized version (lowercase, collapsed whitespace).InlineParserContext
for lookup (#204).
This allows custom contexts to change the lookup logic and have access to the original
label content.
In case you have a custom implementation of InlineParserContext
, you might need to adjust
it to do normalization.|
-
rows that didn't have spaces before were not affected (#199). This bug
is present in 0.16.1 and 0.17.0.