Commonmark Java Versions Save

Java library for parsing and rendering CommonMark (Markdown)

commonmark-parent-0.22.0

2 months ago

Added

  • New 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:
    • The type of heading used
    • The type of link used (reference links will be rendered as inline links)
    • Whether special characters are escaped or not
    • Leading and trailing whitespace
  • Modular JAR (JPMS): All artifacts now include module descriptors (module-info) so jlink can be used; the old Automatic-Module-Name manifest entries were removed
  • New package org.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 parsers
  • New package org.commonmark.text for text related utilities that are useful for both parsing and rendering
  • TableCell 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/content
  • Deprecated a some properties of BulletList, OrderedList, FencedCodeBlock and replaced with nullable ones because they might not be set when constructing these nodes manually instead of via parsing

Changed

  • Java 11 or later is now required (dropping support for Java 8)
  • Update to CommonMark spec 0.31.2

Fixed

  • Fix LinkReferenceDefinition having null SourceSpan when title is present and parsing with source spans option enabled (#310)

commonmark-parent-0.21.0

1 year ago

Added

  • GitHub strikethrough: With the previous version we adjusted the extension to also accept the single tilde syntax. But if you use another extension that uses the single tilde syntax, you will get a conflict. To avoid that, StrikethroughExtension can now be configured to require two tildes like before, see Javadoc. (#271)

commonmark-parent-0.20.0

1 year ago

Fixed

  • GitHub tables: A single pipe (optional whitespace) now ends a table instead of crashing or being treated as an empty row, for consistency with GitHub (#255).
  • GitHub strikethrough: A single tilde now also works, and more than two tildes are not accepted anymore. This brings us in line with what GitHub actually does, which is a bit underspecified (#267)
  • The autolink extension now handles source spans correctly (#209)

commonmark-parent-0.19.0

1 year ago

Added

  • YAML front matter extension: Limited support for single and double quoted string values (#260)

Changed

  • Check argument of enabledBlockTypes when building parser instead of NPEing later

commonmark-parent-0.18.1

1 year ago

Fixed

  • Fix tables with leading/trailing header pipes and trailing spaces (#244). This was a regression in 0.16.1 which is now fixed.

commonmark-parent-0.18.2

1 year ago

Changed

  • Test against Java 17
  • Bundle LICENSE.txt with artifacts (in addition to Maven metadata)

commonmark-parent-0.18.0

2 years ago

Changed

  • Update to CommonMark spec 0.30:
    • Add 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.
    • Fix case folding for link reference labels in some cases (e.g. and SS should match)
    • Allow lowercase ASCII in HTML declaration
    • Don't let type 7 HTML blocks interrupt lazy paragraphs either
  • Preserve the original case for the label of LinkReferenceDefinition. Before, we used to store the normalized version (lowercase, collapsed whitespace).

commonmark-parent-0.17.2

3 years ago

Changed

  • Pass original instead of normalized label to 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.

commonmark-parent-0.17.1

3 years ago

Fixed

  • Fix emphasis surrounded by non-BMP punctuation/whitespace characters (characters that are longer than one UTF-16 "char"). Note that this is an edge case with rarely used Unicode characters, which a lot of other implementations don't handle correctly.
  • Fix tables where the row starts with spaces and then the first | - rows that didn't have spaces before were not affected (#199). This bug is present in 0.16.1 and 0.17.0.

commonmark-parent-0.17.0

3 years ago

Changed

  • ACTION REQUIRED: Maven groupId has changed from com.atlassian.commonmark to org.commonmark
    • To continue getting new versions of commonmark-java, change the Maven coordinates in your dependencies:
    • Old: <groupId>com.atlassian.commonmark</groupId>
    • New: <groupId>org.commonmark</groupId>