Skip to content

Commit

Permalink
It's necessary to keep a copy of the original literal.Span.End, becau…
Browse files Browse the repository at this point in the history
…se otherwise it is just lost in some cases.
  • Loading branch information
snnz committed Dec 18, 2024
1 parent 5e4a917 commit 2cff6c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ private void DocumentOnProcessInlinesBegin(InlineProcessor inlineProcessor, Inli
{
var literal = (LiteralInline)processor.Inline!;
var originalLiteral = literal;
var originalSpanEnd = literal.Span.End;

ContainerInline? container = null;

Expand Down Expand Up @@ -171,7 +172,7 @@ private void DocumentOnProcessInlinesBegin(InlineProcessor inlineProcessor, Inli
// Process the remaining literal
literal = new LiteralInline()
{
Span = new SourceSpan(abbrInline.Span.End + 1, container.Span.End),
Span = new SourceSpan(abbrInline.Span.End + 1, originalSpanEnd),
Line = line,
Column = column + match.Length,
};
Expand Down

0 comments on commit 2cff6c5

Please sign in to comment.