Skip to content

Commit

Permalink
Merge pull request #313 from commonmark/prepare-0.22
Browse files Browse the repository at this point in the history
Prepare release 0.22
  • Loading branch information
robinst authored Mar 15, 2024
2 parents 260bd2e + bd4012e commit ef730f6
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 29 deletions.
38 changes: 31 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,37 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
with the exception that 0.x versions can break between minor versions.

## [Unreleased]
### Changed
- Modular JAR: Require at least Java 11 and add a module descriptor (module-info),
remove no longer necessary `Automatic-Module-Name` header
## [0.22.0] - 2024-03-15
### 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).
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)

## [0.21.0] - 2022-11-17
### Added
Expand Down Expand Up @@ -387,7 +411,7 @@ API breaking changes (caused by changes in spec):
Initial release of commonmark-java, a port of commonmark.js with extensions
for autolinking URLs, GitHub flavored strikethrough and tables.
[Unreleased]: https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.21.0...HEAD
[0.22.0]: https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.21.0...commonmark-parent-0.22.0
[0.21.0]: https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.20.0...commonmark-parent-0.21.0
[0.20.0]: https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.19.0...commonmark-parent-0.20.0
[0.19.0]: https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.18.2...commonmark-parent-0.19.0
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-autolink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-autolink</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-gfm-strikethrough/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-gfm-strikethrough</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-gfm-tables/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-gfm-tables</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-heading-anchor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-heading-anchor</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-image-attributes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-image-attributes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-ins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-ins</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-task-list-items/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-task-list-items</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-ext-yaml-front-matter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>commonmark-parent</artifactId>
<groupId>org.commonmark</groupId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-ext-yaml-front-matter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-integration-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark-test-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark-test-util</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion commonmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</parent>

<artifactId>commonmark</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Note that it doesn't currently preserve the exact syntax of the original input Markdown (if any):
* <ul>
* <li>Headings are output as ATX headings if possible (multi-line headings need Setext headings)</li>
* <li>Links are always rendered as inline links (no support for reference links yet)</li>
* <li>Escaping might be over-eager, e.g. a plain {@code *} might be escaped
* even though it doesn't need to be in that particular context</li>
* <li>Leading whitespace in paragraphs is not preserved</li>
Expand Down
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.commonmark</groupId>
<artifactId>commonmark-parent</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
<name>commonmark-java parent</name>
<description>
Java implementation of CommonMark, a specification of the Markdown format for turning plain text into formatted
Expand Down Expand Up @@ -111,52 +111,52 @@
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-autolink</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-image-attributes</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-ins</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-gfm-strikethrough</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-gfm-tables</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-heading-anchor</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-task-list-items</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-ext-yaml-front-matter</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark-test-util</artifactId>
<version>0.21.1-SNAPSHOT</version>
<version>0.22.0-SNAPSHOT</version>
</dependency>

<!-- Common test dependencies -->
Expand Down

0 comments on commit ef730f6

Please sign in to comment.