Skip to content

Commit

Permalink
Merge pull request #832 from snnz/footnote
Browse files Browse the repository at this point in the history
Set the correct source location in Footnote and FootnoteLinkReferenceDefinition
  • Loading branch information
xoofx authored Dec 17, 2024
2 parents 102d02a + eb28f76 commit 260f4d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Markdig/Extensions/Footnotes/FootnoteParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 260f4d5

Please sign in to comment.