diff --git a/src/Markdig.Tests/MiscTests.cs b/src/Markdig.Tests/MiscTests.cs index 85847988..0d3d14dd 100644 --- a/src/Markdig.Tests/MiscTests.cs +++ b/src/Markdig.Tests/MiscTests.cs @@ -317,4 +317,31 @@ public void RootInlineInTableCellHasCorrectSourceSpan() Assert.That(paragraph.Inline.Span.Start == paragraph.Inline.FirstChild.Span.Start); Assert.That(paragraph.Inline.Span.End == paragraph.Inline.LastChild.Span.End); } + + [Test] + public void TestAlertWithinAlertOrNestedBlock() + { + var input = @" +>[!NOTE] +[!NOTE] +The second one is not a note. + +>>[!NOTE] +Also not a note. +"; + + var expected = @"
+

Note

+

[!NOTE] +The second one is not a note.

+
+
+
+

[!NOTE] +Also not a note.

+
+
+"; + TestParser.TestSpec(input, expected, new MarkdownPipelineBuilder().UseAlertBlocks().Build()); + } }