[PR #526] [MERGED] Complete nullable annotations #1087

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

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/526
Author: @iamcarbon
Created: 3/11/2021
Status: Merged
Merged: 3/11/2021
Merged by: @xoofx

Base: masterHead: nullability2


📝 Commits (4)

  • 4009c89 Enable nullable at project level and add remaining nullable annotations
  • 9d36a74 Replace == null with is null
  • eedbb49 Revert accidental readonly removal
  • 6b9433c Remove temporary #nullable enable directives

📊 Changes

140 files changed (+205 additions, -400 deletions)

View changed files

📝 src/Markdig/Extensions/Abbreviations/Abbreviation.cs (+2 -2)
📝 src/Markdig/Extensions/Abbreviations/AbbreviationHelper.cs (+0 -2)
📝 src/Markdig/Extensions/Abbreviations/AbbreviationInline.cs (+1 -8)
📝 src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs (+3 -5)
📝 src/Markdig/Extensions/AutoIdentifiers/AutoIdentifierExtension.cs (+2 -5)
📝 src/Markdig/Extensions/AutoIdentifiers/HeadingLinkReferenceDefinition.cs (+5 -0)
📝 src/Markdig/Extensions/AutoLinks/AutoLinkExtension.cs (+1 -1)
📝 src/Markdig/Extensions/AutoLinks/AutoLinkParser.cs (+1 -1)
📝 src/Markdig/Extensions/Citations/CitationExtension.cs (+2 -2)
📝 src/Markdig/Extensions/CustomContainers/CustomContainer.cs (+0 -2)
📝 src/Markdig/Extensions/DefinitionLists/DefinitionListParser.cs (+2 -4)
📝 src/Markdig/Extensions/DefinitionLists/HtmlDefinitionListRenderer.cs (+1 -1)
📝 src/Markdig/Extensions/Diagrams/DiagramExtension.cs (+1 -1)
📝 src/Markdig/Extensions/Emoji/EmojiInline.cs (+1 -1)
📝 src/Markdig/Extensions/Emoji/EmojiMapping.cs (+2 -4)
📝 src/Markdig/Extensions/EmphasisExtras/EmphasisExtraExtension.cs (+1 -1)
📝 src/Markdig/Extensions/Footnotes/Footnote.cs (+1 -1)
📝 src/Markdig/Extensions/Footnotes/FootnoteLink.cs (+5 -0)
📝 src/Markdig/Extensions/Footnotes/FootnoteLinkReferenceDefinition.cs (+5 -0)
📝 src/Markdig/Extensions/Footnotes/FootnoteParser.cs (+4 -8)

...and 80 more files

📄 Description

This PR completes the nullability annotations and enables nullable at the project level.

There are 4 possibility breaking changes introduced to enforce initialization of non-nullable properties to the following classes.

HeadingLinkReferenceDefinition
FootnoteLink
FootnoteLinkReference
HtmlInline

While these classes have to be constructed with a non-null object, they remain fully mutable after construction to allow the DOM to be manipulated.


🔄 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/526 **Author:** [@iamcarbon](https://github.com/iamcarbon) **Created:** 3/11/2021 **Status:** ✅ Merged **Merged:** 3/11/2021 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `nullability2` --- ### 📝 Commits (4) - [`4009c89`](https://github.com/xoofx/markdig/commit/4009c893210d94309afd4333ed861eedbd1afc78) Enable nullable at project level and add remaining nullable annotations - [`9d36a74`](https://github.com/xoofx/markdig/commit/9d36a743121a13d0ed284832995768dde895abce) Replace == null with is null - [`eedbb49`](https://github.com/xoofx/markdig/commit/eedbb494fcc091ba27a4c6d57e2328f01000e268) Revert accidental readonly removal - [`6b9433c`](https://github.com/xoofx/markdig/commit/6b9433c7d8ff518044140098a3f4538e912167f1) Remove temporary #nullable enable directives ### 📊 Changes **140 files changed** (+205 additions, -400 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig/Extensions/Abbreviations/Abbreviation.cs` (+2 -2) 📝 `src/Markdig/Extensions/Abbreviations/AbbreviationHelper.cs` (+0 -2) 📝 `src/Markdig/Extensions/Abbreviations/AbbreviationInline.cs` (+1 -8) 📝 `src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs` (+3 -5) 📝 `src/Markdig/Extensions/AutoIdentifiers/AutoIdentifierExtension.cs` (+2 -5) 📝 `src/Markdig/Extensions/AutoIdentifiers/HeadingLinkReferenceDefinition.cs` (+5 -0) 📝 `src/Markdig/Extensions/AutoLinks/AutoLinkExtension.cs` (+1 -1) 📝 `src/Markdig/Extensions/AutoLinks/AutoLinkParser.cs` (+1 -1) 📝 `src/Markdig/Extensions/Citations/CitationExtension.cs` (+2 -2) 📝 `src/Markdig/Extensions/CustomContainers/CustomContainer.cs` (+0 -2) 📝 `src/Markdig/Extensions/DefinitionLists/DefinitionListParser.cs` (+2 -4) 📝 `src/Markdig/Extensions/DefinitionLists/HtmlDefinitionListRenderer.cs` (+1 -1) 📝 `src/Markdig/Extensions/Diagrams/DiagramExtension.cs` (+1 -1) 📝 `src/Markdig/Extensions/Emoji/EmojiInline.cs` (+1 -1) 📝 `src/Markdig/Extensions/Emoji/EmojiMapping.cs` (+2 -4) 📝 `src/Markdig/Extensions/EmphasisExtras/EmphasisExtraExtension.cs` (+1 -1) 📝 `src/Markdig/Extensions/Footnotes/Footnote.cs` (+1 -1) 📝 `src/Markdig/Extensions/Footnotes/FootnoteLink.cs` (+5 -0) 📝 `src/Markdig/Extensions/Footnotes/FootnoteLinkReferenceDefinition.cs` (+5 -0) 📝 `src/Markdig/Extensions/Footnotes/FootnoteParser.cs` (+4 -8) _...and 80 more files_ </details> ### 📄 Description This PR completes the nullability annotations and enables nullable at the project level. There are 4 possibility breaking changes introduced to enforce initialization of non-nullable properties to the following classes. HeadingLinkReferenceDefinition FootnoteLink FootnoteLinkReference HtmlInline While these classes have to be constructed with a non-null object, they remain fully mutable after construction to allow the DOM to be manipulated. --- <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:49:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1087