Skip to content

Commit 3f5f672

Browse files
committed
Callouts should not be parsed from nested code blocks
1 parent 6ddd7a6 commit 3f5f672

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockParser.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public override bool Close(BlockProcessor processor, Block block)
9494
span = lines.Lines[index].Slice.AsSpan();
9595
}
9696

97+
if (codeBlock.OpeningFencedCharCount > 3)
98+
continue;
99+
97100
var matchClassicCallout = CallOutParser.CallOutNumber().EnumerateMatches(span);
98101
var callOut = EnumerateAnnotations(matchClassicCallout, ref span, ref callOutIndex, originatingLine, false);
99102

0 commit comments

Comments
 (0)