[PR #243] [MERGED] Fix Link and Footnote reference definitions in syntax tree #887

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

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/243
Author: @MihaZupan
Created: 9/11/2018
Status: Merged
Merged: 9/15/2018
Merged by: @xoofx

Base: masterHead: all-link-definitions


📝 Commits (5)

  • d1576fd Fix LinkReferenceDefinition source positions
  • 595dbb9 Fix FootnoteLinkReferenceDefinition content and source positions
  • 6e55d84 Add a FootnoteDefinition source position test
  • b1440ab Add a LinkReferenceDefinition source position test
  • 31e163f Fix offset calculation

📊 Changes

6 files changed (+91 additions, -24 deletions)

View changed files

📝 src/Markdig.Tests/TestSourcePosition.cs (+44 -1)
📝 src/Markdig/Extensions/Footnotes/FootnoteParser.cs (+7 -3)
📝 src/Markdig/MarkdownPipelineBuilder.cs (+11 -4)
📝 src/Markdig/Parsers/ParagraphBlockParser.cs (+14 -9)
📝 src/Markdig/Syntax/LinkReferenceDefinitionGroup.cs (+9 -6)
📝 src/Markdig/Syntax/SourceSpan.cs (+6 -1)

📄 Description

This does not affect HTML rendering at all, it merely exposes more information to the syntax tree:

  • Keep all LinkReferenceDefinitions (doesn't overwrite same-named ones)
  • Sets the correct lines and spans for them
  • Sets the content and source locations for FootnoteLinkReferenceDefinitions

🔄 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/243 **Author:** [@MihaZupan](https://github.com/MihaZupan) **Created:** 9/11/2018 **Status:** ✅ Merged **Merged:** 9/15/2018 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `all-link-definitions` --- ### 📝 Commits (5) - [`d1576fd`](https://github.com/xoofx/markdig/commit/d1576fd2eead1293dc22692476215fd08cf55e4c) Fix LinkReferenceDefinition source positions - [`595dbb9`](https://github.com/xoofx/markdig/commit/595dbb9af48b880c009ca1392e649d1e5ca421fb) Fix FootnoteLinkReferenceDefinition content and source positions - [`6e55d84`](https://github.com/xoofx/markdig/commit/6e55d84f01314d317c0b7317e0c31c64fe9e38e4) Add a FootnoteDefinition source position test - [`b1440ab`](https://github.com/xoofx/markdig/commit/b1440ab78882e651e07c46a9de77f16ded3f7e96) Add a LinkReferenceDefinition source position test - [`31e163f`](https://github.com/xoofx/markdig/commit/31e163f9f7c9f4f97b26a3308de5362ff0c8f647) Fix offset calculation ### 📊 Changes **6 files changed** (+91 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/TestSourcePosition.cs` (+44 -1) 📝 `src/Markdig/Extensions/Footnotes/FootnoteParser.cs` (+7 -3) 📝 `src/Markdig/MarkdownPipelineBuilder.cs` (+11 -4) 📝 `src/Markdig/Parsers/ParagraphBlockParser.cs` (+14 -9) 📝 `src/Markdig/Syntax/LinkReferenceDefinitionGroup.cs` (+9 -6) 📝 `src/Markdig/Syntax/SourceSpan.cs` (+6 -1) </details> ### 📄 Description This does not affect HTML rendering at all, it merely exposes more information to the syntax tree: - Keep all LinkReferenceDefinitions (doesn't overwrite same-named ones) - Sets the correct lines and spans for them - Sets the content and source locations for FootnoteLinkReferenceDefinitions --- <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:46:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#887