From a1693ae1e1b2cdc9bf9d48578364377dc713b122 Mon Sep 17 00:00:00 2001
From: "Robin Stocker (GitHub Actions)"
<16778+robinst@users.noreply.github.com>
Date: Sat, 10 Oct 2026 13:36:16 +0000
Subject: [PATCH 1/3] [maven-release-plugin] prepare release
commonmark-parent-0.30.1
---
commonmark-ext-autolink/pom.xml | 2 +-
commonmark-ext-footnotes/pom.xml | 2 +-
commonmark-ext-gfm-alerts/pom.xml | 2 +-
commonmark-ext-gfm-strikethrough/pom.xml | 2 +-
commonmark-ext-gfm-tables/pom.xml | 2 +-
commonmark-ext-heading-anchor/pom.xml | 2 +-
commonmark-ext-image-attributes/pom.xml | 2 +-
commonmark-ext-ins/pom.xml | 2 +-
commonmark-ext-task-list-items/pom.xml | 2 +-
commonmark-ext-yaml-front-matter/pom.xml | 2 +-
commonmark-integration-test/pom.xml | 2 +-
commonmark-test-util/pom.xml | 2 +-
commonmark/pom.xml | 2 +-
pom.xml | 28 ++++++++++++------------
14 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/commonmark-ext-autolink/pom.xml b/commonmark-ext-autolink/pom.xml
index af2b9936..8df2acfa 100644
--- a/commonmark-ext-autolink/pom.xml
+++ b/commonmark-ext-autolink/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-autolink
diff --git a/commonmark-ext-footnotes/pom.xml b/commonmark-ext-footnotes/pom.xml
index 7300078b..39bfea5e 100644
--- a/commonmark-ext-footnotes/pom.xml
+++ b/commonmark-ext-footnotes/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-footnotes
diff --git a/commonmark-ext-gfm-alerts/pom.xml b/commonmark-ext-gfm-alerts/pom.xml
index ec7467f8..4b64240c 100644
--- a/commonmark-ext-gfm-alerts/pom.xml
+++ b/commonmark-ext-gfm-alerts/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-gfm-alerts
diff --git a/commonmark-ext-gfm-strikethrough/pom.xml b/commonmark-ext-gfm-strikethrough/pom.xml
index a3bdf38e..c90a8e1a 100644
--- a/commonmark-ext-gfm-strikethrough/pom.xml
+++ b/commonmark-ext-gfm-strikethrough/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-gfm-strikethrough
diff --git a/commonmark-ext-gfm-tables/pom.xml b/commonmark-ext-gfm-tables/pom.xml
index ea35aaf1..979e85d5 100644
--- a/commonmark-ext-gfm-tables/pom.xml
+++ b/commonmark-ext-gfm-tables/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-gfm-tables
diff --git a/commonmark-ext-heading-anchor/pom.xml b/commonmark-ext-heading-anchor/pom.xml
index 33035641..5f5df0d4 100644
--- a/commonmark-ext-heading-anchor/pom.xml
+++ b/commonmark-ext-heading-anchor/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-heading-anchor
diff --git a/commonmark-ext-image-attributes/pom.xml b/commonmark-ext-image-attributes/pom.xml
index f48904c5..e8bd264b 100644
--- a/commonmark-ext-image-attributes/pom.xml
+++ b/commonmark-ext-image-attributes/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-image-attributes
diff --git a/commonmark-ext-ins/pom.xml b/commonmark-ext-ins/pom.xml
index b275a4e9..98456217 100644
--- a/commonmark-ext-ins/pom.xml
+++ b/commonmark-ext-ins/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-ins
diff --git a/commonmark-ext-task-list-items/pom.xml b/commonmark-ext-task-list-items/pom.xml
index b8d708a2..61a2f21e 100644
--- a/commonmark-ext-task-list-items/pom.xml
+++ b/commonmark-ext-task-list-items/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-task-list-items
diff --git a/commonmark-ext-yaml-front-matter/pom.xml b/commonmark-ext-yaml-front-matter/pom.xml
index d3156892..72c57f01 100644
--- a/commonmark-ext-yaml-front-matter/pom.xml
+++ b/commonmark-ext-yaml-front-matter/pom.xml
@@ -4,7 +4,7 @@
commonmark-parent
org.commonmark
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-ext-yaml-front-matter
diff --git a/commonmark-integration-test/pom.xml b/commonmark-integration-test/pom.xml
index d16b7ea0..9e031bd2 100644
--- a/commonmark-integration-test/pom.xml
+++ b/commonmark-integration-test/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-integration-test
diff --git a/commonmark-test-util/pom.xml b/commonmark-test-util/pom.xml
index 3eb723f4..4b62a2ac 100644
--- a/commonmark-test-util/pom.xml
+++ b/commonmark-test-util/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-test-util
diff --git a/commonmark/pom.xml b/commonmark/pom.xml
index 30125aa0..f6c0caff 100644
--- a/commonmark/pom.xml
+++ b/commonmark/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark
diff --git a/pom.xml b/pom.xml
index 1556a92a..c2be79ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.commonmark
commonmark-parent
- 0.30.1-SNAPSHOT
+ 0.30.1
commonmark-java parent
Java implementation of CommonMark, a specification of the Markdown format for turning plain text into formatted
@@ -146,62 +146,62 @@
org.commonmark
commonmark
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-autolink
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-footnotes
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-image-attributes
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-ins
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-gfm-alerts
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-gfm-strikethrough
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-gfm-tables
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-heading-anchor
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-task-list-items
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-ext-yaml-front-matter
- 0.30.1-SNAPSHOT
+ 0.30.1
org.commonmark
commonmark-test-util
- 0.30.1-SNAPSHOT
+ 0.30.1
@@ -328,7 +328,7 @@
scm:git:https://github.com/commonmark/commonmark-java
scm:git:https://github.com/commonmark/commonmark-java
https://github.com/commonmark/commonmark-java
- HEAD
+ commonmark-parent-0.30.1
From 35c7a833d926c67abb7e03527ebfcf8eba393b63 Mon Sep 17 00:00:00 2001
From: "Robin Stocker (GitHub Actions)"
<16778+robinst@users.noreply.github.com>
Date: Sat, 10 Oct 2026 13:36:18 +0000
Subject: [PATCH 2/3] [maven-release-plugin] prepare for next development
iteration
---
commonmark-ext-autolink/pom.xml | 2 +-
commonmark-ext-footnotes/pom.xml | 2 +-
commonmark-ext-gfm-alerts/pom.xml | 2 +-
commonmark-ext-gfm-strikethrough/pom.xml | 2 +-
commonmark-ext-gfm-tables/pom.xml | 2 +-
commonmark-ext-heading-anchor/pom.xml | 2 +-
commonmark-ext-image-attributes/pom.xml | 2 +-
commonmark-ext-ins/pom.xml | 2 +-
commonmark-ext-task-list-items/pom.xml | 2 +-
commonmark-ext-yaml-front-matter/pom.xml | 2 +-
commonmark-integration-test/pom.xml | 2 +-
commonmark-test-util/pom.xml | 2 +-
commonmark/pom.xml | 2 +-
pom.xml | 28 ++++++++++++------------
14 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/commonmark-ext-autolink/pom.xml b/commonmark-ext-autolink/pom.xml
index 8df2acfa..297b7830 100644
--- a/commonmark-ext-autolink/pom.xml
+++ b/commonmark-ext-autolink/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-autolink
diff --git a/commonmark-ext-footnotes/pom.xml b/commonmark-ext-footnotes/pom.xml
index 39bfea5e..efa0aae5 100644
--- a/commonmark-ext-footnotes/pom.xml
+++ b/commonmark-ext-footnotes/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-footnotes
diff --git a/commonmark-ext-gfm-alerts/pom.xml b/commonmark-ext-gfm-alerts/pom.xml
index 4b64240c..b65273b4 100644
--- a/commonmark-ext-gfm-alerts/pom.xml
+++ b/commonmark-ext-gfm-alerts/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-gfm-alerts
diff --git a/commonmark-ext-gfm-strikethrough/pom.xml b/commonmark-ext-gfm-strikethrough/pom.xml
index c90a8e1a..fef5bc59 100644
--- a/commonmark-ext-gfm-strikethrough/pom.xml
+++ b/commonmark-ext-gfm-strikethrough/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-gfm-strikethrough
diff --git a/commonmark-ext-gfm-tables/pom.xml b/commonmark-ext-gfm-tables/pom.xml
index 979e85d5..f2f12926 100644
--- a/commonmark-ext-gfm-tables/pom.xml
+++ b/commonmark-ext-gfm-tables/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-gfm-tables
diff --git a/commonmark-ext-heading-anchor/pom.xml b/commonmark-ext-heading-anchor/pom.xml
index 5f5df0d4..e1a6026b 100644
--- a/commonmark-ext-heading-anchor/pom.xml
+++ b/commonmark-ext-heading-anchor/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-heading-anchor
diff --git a/commonmark-ext-image-attributes/pom.xml b/commonmark-ext-image-attributes/pom.xml
index e8bd264b..07ddb121 100644
--- a/commonmark-ext-image-attributes/pom.xml
+++ b/commonmark-ext-image-attributes/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-image-attributes
diff --git a/commonmark-ext-ins/pom.xml b/commonmark-ext-ins/pom.xml
index 98456217..c6a5c4e4 100644
--- a/commonmark-ext-ins/pom.xml
+++ b/commonmark-ext-ins/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-ins
diff --git a/commonmark-ext-task-list-items/pom.xml b/commonmark-ext-task-list-items/pom.xml
index 61a2f21e..1e412539 100644
--- a/commonmark-ext-task-list-items/pom.xml
+++ b/commonmark-ext-task-list-items/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-task-list-items
diff --git a/commonmark-ext-yaml-front-matter/pom.xml b/commonmark-ext-yaml-front-matter/pom.xml
index 72c57f01..0185f55c 100644
--- a/commonmark-ext-yaml-front-matter/pom.xml
+++ b/commonmark-ext-yaml-front-matter/pom.xml
@@ -4,7 +4,7 @@
commonmark-parent
org.commonmark
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-ext-yaml-front-matter
diff --git a/commonmark-integration-test/pom.xml b/commonmark-integration-test/pom.xml
index 9e031bd2..de27cc2d 100644
--- a/commonmark-integration-test/pom.xml
+++ b/commonmark-integration-test/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-integration-test
diff --git a/commonmark-test-util/pom.xml b/commonmark-test-util/pom.xml
index 4b62a2ac..8fad7d0c 100644
--- a/commonmark-test-util/pom.xml
+++ b/commonmark-test-util/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-test-util
diff --git a/commonmark/pom.xml b/commonmark/pom.xml
index f6c0caff..af0c5cd7 100644
--- a/commonmark/pom.xml
+++ b/commonmark/pom.xml
@@ -4,7 +4,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark
diff --git a/pom.xml b/pom.xml
index c2be79ff..93947a9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.commonmark
commonmark-parent
- 0.30.1
+ 0.30.2-SNAPSHOT
commonmark-java parent
Java implementation of CommonMark, a specification of the Markdown format for turning plain text into formatted
@@ -146,62 +146,62 @@
org.commonmark
commonmark
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-autolink
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-footnotes
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-image-attributes
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-ins
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-gfm-alerts
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-gfm-strikethrough
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-gfm-tables
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-heading-anchor
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-task-list-items
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-ext-yaml-front-matter
- 0.30.1
+ 0.30.2-SNAPSHOT
org.commonmark
commonmark-test-util
- 0.30.1
+ 0.30.2-SNAPSHOT
@@ -328,7 +328,7 @@
scm:git:https://github.com/commonmark/commonmark-java
scm:git:https://github.com/commonmark/commonmark-java
https://github.com/commonmark/commonmark-java
- commonmark-parent-0.30.1
+ HEAD
From 24c68a9d4230752551edd13a25fc847074ab2ff8 Mon Sep 17 00:00:00 2001
From: Sean
Date: Sat, 10 Oct 2026 21:39:32 +0800
Subject: [PATCH 3/3] Fix source spans for unclosed reference titles
---
.../LinkReferenceDefinitionParser.java | 19 +++++++++++++++---
.../LinkReferenceDefinitionParserTest.java | 20 +++++++++++++++++++
2 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/commonmark/src/main/java/org/commonmark/internal/LinkReferenceDefinitionParser.java b/commonmark/src/main/java/org/commonmark/internal/LinkReferenceDefinitionParser.java
index 8725a061..8a10d212 100644
--- a/commonmark/src/main/java/org/commonmark/internal/LinkReferenceDefinitionParser.java
+++ b/commonmark/src/main/java/org/commonmark/internal/LinkReferenceDefinitionParser.java
@@ -30,6 +30,7 @@ public class LinkReferenceDefinitionParser {
private String destination;
private char titleDelimiter;
private StringBuilder title;
+ private int titleSourceSpanStart = -1;
private boolean referenceValid = false;
public void parse(SourceLine line) {
@@ -226,6 +227,7 @@ private boolean startTitle(Scanner scanner) {
if (titleDelimiter != '\0') {
state = State.TITLE;
+ titleSourceSpanStart = sourceSpans.size();
title = new StringBuilder();
scanner.next();
if (!scanner.hasNext()) {
@@ -277,17 +279,28 @@ private void finishReference() {
return;
}
+ boolean incompleteTitle = state == State.TITLE;
String d = Escaping.unescapeString(destination);
- String t = title != null ? Escaping.unescapeString(title.toString()) : null;
+ String t =
+ !incompleteTitle && title != null
+ ? Escaping.unescapeString(title.toString())
+ : null;
LinkReferenceDefinition definition = new LinkReferenceDefinition(label.toString(), d, t);
- definition.setSourceSpans(sourceSpans);
- sourceSpans.clear();
+ if (incompleteTitle) {
+ definition.setSourceSpans(
+ new ArrayList<>(sourceSpans.subList(0, titleSourceSpanStart)));
+ sourceSpans.subList(0, titleSourceSpanStart).clear();
+ } else {
+ definition.setSourceSpans(sourceSpans);
+ sourceSpans.clear();
+ }
definitions.add(definition);
label = null;
referenceValid = false;
destination = null;
title = null;
+ titleSourceSpanStart = -1;
}
private static void removeLast(int n, List list) {
diff --git a/commonmark/src/test/java/org/commonmark/internal/LinkReferenceDefinitionParserTest.java b/commonmark/src/test/java/org/commonmark/internal/LinkReferenceDefinitionParserTest.java
index d9ee3a99..a2a78151 100644
--- a/commonmark/src/test/java/org/commonmark/internal/LinkReferenceDefinitionParserTest.java
+++ b/commonmark/src/test/java/org/commonmark/internal/LinkReferenceDefinitionParserTest.java
@@ -4,6 +4,7 @@
import org.commonmark.internal.LinkReferenceDefinitionParser.State;
import org.commonmark.node.LinkReferenceDefinition;
+import org.commonmark.node.SourceSpan;
import org.commonmark.parser.SourceLine;
import org.junit.jupiter.api.Test;
@@ -169,6 +170,25 @@ void testTitleMultiline4() {
assertDef(parser.getDefinitions().get(0), "foo", "/url", null);
}
+ @Test
+ void testUnclosedMultilineTitleKeepsParagraphSourceSpans() {
+ SourceSpan definitionSpan = SourceSpan.of(0, 0, 0, 11);
+ SourceSpan paragraphSpan = SourceSpan.of(1, 0, 12, 14);
+
+ parse("[foo]: /url");
+ parser.addSourceSpan(definitionSpan);
+ parse("(partial title");
+ parser.addSourceSpan(paragraphSpan);
+
+ var definitions = parser.getDefinitions();
+
+ assertThat(definitions).hasSize(1);
+ assertDef(definitions.get(0), "foo", "/url", null);
+ assertThat(definitions.get(0).getSourceSpans()).containsExactly(definitionSpan);
+ assertThat(parser.getParagraphLines().getContent()).isEqualTo("(partial title");
+ assertThat(parser.getParagraphSourceSpans()).containsExactly(paragraphSpan);
+ }
+
@Test
void testTitleInvalid() {
assertParagraph("[foo]: /url (invalid(");