mirror of
https://github.com/xoofx/markdig.git
synced 2026-11-17 18:00:55 +00:00
fix paragraph with more then 2 newlines after
This commit is contained in:
@@ -198,6 +198,11 @@ namespace Markdig.Tests.RoundtripSpecs
|
||||
[TestCase("\r\np\np\r\n")]
|
||||
[TestCase("\r\np\rp\r\n")]
|
||||
[TestCase("\r\np\r\np\r\n")]
|
||||
|
||||
[TestCase("p\n")]
|
||||
[TestCase("p\n\n")]
|
||||
[TestCase("p\n\n\n")]
|
||||
[TestCase("p\n\n\n\n")]
|
||||
public void TestNewline(string value)
|
||||
{
|
||||
RoundTrip(value);
|
||||
|
||||
@@ -125,7 +125,8 @@ namespace Markdig.Parsers
|
||||
// of the document.
|
||||
if (lastBlock != null && blockProcessor.BeforeLines != null)
|
||||
{
|
||||
lastBlock.LinesAfter = blockProcessor.BeforeLines ?? new List<StringSlice>();
|
||||
lastBlock.LinesAfter ??= new List<StringSlice>();
|
||||
lastBlock.LinesAfter.AddRange(blockProcessor.BeforeLines);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user