[PR #876] [MERGED] Fix #872 by reserve null title string. #1268

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

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/876
Author: @Akarinnnnn
Created: 5/31/2025
Status: Merged
Merged: 6/5/2025
Merged by: @xoofx

Base: masterHead: fix-872


📝 Commits (4)

  • 47c4e9b Fix #872 by reserve null title string.
  • 6d1fa96 Changed link parsing tests for #872
  • 6261660 Explain why not to normalize link title into empty strings
  • ec2eef2 Remove HtmlHelper.UnescapeNullable

📊 Changes

3 files changed (+8 additions, -8 deletions)

View changed files

📝 src/Markdig.Tests/TestLinkHelper.cs (+5 -5)
📝 src/Markdig/Helpers/LinkHelper.cs (+2 -2)
📝 src/Markdig/Parsers/Inlines/LinkInlineParser.cs (+1 -1)

📄 Description

#872 reported an inconsistency between nullable annotation and possible value. In case of no title exists in a link syntax, consumers except Title property returns a null string. But current behavior is Title returning an empty string, This PR fixes the inconsistency by make Title property null if link title is not exist.


🔄 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/876 **Author:** [@Akarinnnnn](https://github.com/Akarinnnnn) **Created:** 5/31/2025 **Status:** ✅ Merged **Merged:** 6/5/2025 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `fix-872` --- ### 📝 Commits (4) - [`47c4e9b`](https://github.com/xoofx/markdig/commit/47c4e9b1e2c6cd6eea018326a7053505dd904017) Fix #872 by reserve null title string. - [`6d1fa96`](https://github.com/xoofx/markdig/commit/6d1fa96389c8cf04f235a9de06f1fb271610d95f) Changed link parsing tests for #872 - [`6261660`](https://github.com/xoofx/markdig/commit/6261660d377e28430c0b01a0efc1f55476f86a45) Explain why not to normalize link title into empty strings - [`ec2eef2`](https://github.com/xoofx/markdig/commit/ec2eef25b2a70dfab54e2636f50d14f2a0b8ca08) Remove HtmlHelper.UnescapeNullable ### 📊 Changes **3 files changed** (+8 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/TestLinkHelper.cs` (+5 -5) 📝 `src/Markdig/Helpers/LinkHelper.cs` (+2 -2) 📝 `src/Markdig/Parsers/Inlines/LinkInlineParser.cs` (+1 -1) </details> ### 📄 Description #872 reported an inconsistency between nullable annotation and possible value. In case of no title exists in a link syntax, consumers except `Title` property returns a null string. But current behavior is `Title` returning an empty string, This PR fixes the inconsistency by make `Title` property null if link title is not exist. --- <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:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1268