Skip to content

Commit

Permalink
Set the correct source location to the Footnote and FootnoteLinkRefer…
Browse files Browse the repository at this point in the history
…enceDefinition.
  • Loading branch information
snnz committed Dec 15, 2024
1 parent 49cf59b commit eb28f76
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 eb28f76

Please sign in to comment.