Skip to content

Commit 2cff6c5

Browse files
committedDec 18, 2024·
It's necessary to keep a copy of the original literal.Span.End, because otherwise it is just lost in some cases.
1 parent 5e4a917 commit 2cff6c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/Markdig/Extensions/Abbreviations/AbbreviationParser.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private void DocumentOnProcessInlinesBegin(InlineProcessor inlineProcessor, Inli
8989
{
9090
var literal = (LiteralInline)processor.Inline!;
9191
var originalLiteral = literal;
92+
var originalSpanEnd = literal.Span.End;
9293

9394
ContainerInline? container = null;
9495

@@ -171,7 +172,7 @@ private void DocumentOnProcessInlinesBegin(InlineProcessor inlineProcessor, Inli
171172
// Process the remaining literal
172173
literal = new LiteralInline()
173174
{
174-
Span = new SourceSpan(abbrInline.Span.End + 1, container.Span.End),
175+
Span = new SourceSpan(abbrInline.Span.End + 1, originalSpanEnd),
175176
Line = line,
176177
Column = column + match.Length,
177178
};

0 commit comments

Comments
 (0)
Please sign in to comment.