From eb28f76588b9a6fd2f25720e2975e81e9ea56c2a Mon Sep 17 00:00:00 2001 From: Sergey Nozhenko Date: Sun, 15 Dec 2024 20:13:35 +0300 Subject: [PATCH] Set the correct source location to the Footnote and FootnoteLinkReferenceDefinition. --- src/Markdig/Extensions/Footnotes/FootnoteParser.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Markdig/Extensions/Footnotes/FootnoteParser.cs b/src/Markdig/Extensions/Footnotes/FootnoteParser.cs index 6d184bde..52c8c2c7 100644 --- a/src/Markdig/Extensions/Footnotes/FootnoteParser.cs +++ b/src/Markdig/Extensions/Footnotes/FootnoteParser.cs @@ -57,6 +57,8 @@ private BlockState TryOpen(BlockProcessor processor, bool isContinue) { Label = label, LabelSpan = labelSpan, + Column = processor.Column, + Span = new SourceSpan(processor.Start, processor.Line.End), }; // Maintain a list of all footnotes at document level @@ -74,6 +76,7 @@ private BlockState TryOpen(BlockProcessor processor, bool isContinue) { CreateLinkInline = CreateLinkToFootnote, Line = processor.LineIndex, + Column = saved, Span = new SourceSpan(start, processor.Start - 2), // account for ]: LabelSpan = labelSpan, Label = label