[PR #867] [MERGED] Update to CommonMark 0.31.2 #1269

Open
opened 2026-01-29 14:52:20 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/867
Author: @MihaZupan
Created: 4/15/2025
Status: Merged
Merged: 4/15/2025
Merged by: @xoofx

Base: masterHead: commonmark-0.31.2


📝 Commits (5)

  • 023d93c Update CommonMark spec to 0.31.2
  • a9ce0eb Update definition of punctuation to include symbols
  • 61e9be2 Allow empty HTML comments, double hyphens in text
  • b15cf58 Add 'search' HTML tag support
  • 42ab989 Update readme

📊 Changes

13 files changed (+1224 additions, -1070 deletions)

View changed files

📝 readme.md (+1 -1)
📝 src/Markdig.Tests/Specs/AutoLinks.generated.cs (+23 -0)
📝 src/Markdig.Tests/Specs/AutoLinks.md (+15 -0)
📝 src/Markdig.Tests/Specs/CommonMark.generated.cs (+899 -895)
📝 src/Markdig.Tests/Specs/CommonMark.md (+78 -75)
📝 src/Markdig.Tests/Specs/EmphasisExtraSpecs.generated.cs (+6 -4)
📝 src/Markdig.Tests/Specs/EmphasisExtraSpecs.md (+5 -4)
📝 src/Markdig.Tests/TestCharHelper.cs (+52 -10)
src/Markdig.Tests/TestHtmlCodeBlocks.cs (+35 -0)
📝 src/Markdig/Helpers/CharHelper.cs (+44 -25)
📝 src/Markdig/Helpers/HtmlHelper.cs (+36 -23)
📝 src/Markdig/Helpers/LinkHelper.cs (+27 -31)
📝 src/Markdig/Parsers/HtmlBlockParser.cs (+3 -2)

📄 Description

Main changes:

  • Definition of "Unicode punctuation character" has changed to also include symbol categories.
    • We were using the same helper when parsing autolinks (<http://...>) and GFM autolinks (http://...)
    • The one for AutoLinks seems to have been wrong, updated it to match the spec now
    • GitHub appears to allow symbols in its autolinks (e.g. emoji in domain name), so I tried to match that by keeping the old behavior there
  • More forms of inline raw HTML comments are allowed: <!-->, <!--->
  • search is apparently an HTML tag now

.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/867 **Author:** [@MihaZupan](https://github.com/MihaZupan) **Created:** 4/15/2025 **Status:** ✅ Merged **Merged:** 4/15/2025 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `commonmark-0.31.2` --- ### 📝 Commits (5) - [`023d93c`](https://github.com/xoofx/markdig/commit/023d93c091070e4e215c81158c22a2ec12ae1ce2) Update CommonMark spec to 0.31.2 - [`a9ce0eb`](https://github.com/xoofx/markdig/commit/a9ce0eb438e48706d123cde703f85fb5627134ed) Update definition of punctuation to include symbols - [`61e9be2`](https://github.com/xoofx/markdig/commit/61e9be290b1dad611e8137251d249a3aae9664d3) Allow empty HTML comments, double hyphens in text - [`b15cf58`](https://github.com/xoofx/markdig/commit/b15cf582a538e0c0e016e70cb8a0f03d4f2d55d8) Add 'search' HTML tag support - [`42ab989`](https://github.com/xoofx/markdig/commit/42ab98968d7efcc76a18d5bdabd1b2e48166539b) Update readme ### 📊 Changes **13 files changed** (+1224 additions, -1070 deletions) <details> <summary>View changed files</summary> 📝 `readme.md` (+1 -1) 📝 `src/Markdig.Tests/Specs/AutoLinks.generated.cs` (+23 -0) 📝 `src/Markdig.Tests/Specs/AutoLinks.md` (+15 -0) 📝 `src/Markdig.Tests/Specs/CommonMark.generated.cs` (+899 -895) 📝 `src/Markdig.Tests/Specs/CommonMark.md` (+78 -75) 📝 `src/Markdig.Tests/Specs/EmphasisExtraSpecs.generated.cs` (+6 -4) 📝 `src/Markdig.Tests/Specs/EmphasisExtraSpecs.md` (+5 -4) 📝 `src/Markdig.Tests/TestCharHelper.cs` (+52 -10) ➕ `src/Markdig.Tests/TestHtmlCodeBlocks.cs` (+35 -0) 📝 `src/Markdig/Helpers/CharHelper.cs` (+44 -25) 📝 `src/Markdig/Helpers/HtmlHelper.cs` (+36 -23) 📝 `src/Markdig/Helpers/LinkHelper.cs` (+27 -31) 📝 `src/Markdig/Parsers/HtmlBlockParser.cs` (+3 -2) </details> ### 📄 Description Main changes: - Definition of "Unicode punctuation character" has changed to also include symbol categories. - We were using the same helper when parsing autolinks (`<http://...>`) and GFM autolinks (`http://...`) - The one for AutoLinks seems to have been wrong, updated it to match the spec now - GitHub appears to allow symbols in its autolinks (e.g. emoji in domain name), so I tried to match that by keeping the old behavior there - More forms of inline raw HTML comments are allowed: `<!-->`, `<!--->` - `search` is apparently an HTML tag now . --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:52:20 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1269