1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Clarify sequential lines being tracked are empty

This commit is contained in:
Aidan Woods 2020-01-19 15:32:51 +00:00
parent 8d09320009
commit 39b8b04d33
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -57,23 +57,23 @@ final class Lines
$text = \str_replace(["\r\n", "\r"], "\n", $text);
$Contexts = [];
$sequentialLines = '';
$sequentialEmptyLines = '';
foreach (\explode("\n", $text) as $line) {
if (\chop($line) === '') {
$sequentialLines .= $line . "\n";
$sequentialEmptyLines .= $line . "\n";
continue;
}
$Contexts[] = new Context(
new Line($line, $indentOffset),
$sequentialLines
$sequentialEmptyLines
);
$sequentialLines = '';
$sequentialEmptyLines = '';
}
return new self($Contexts, $sequentialLines);
return new self($Contexts, $sequentialEmptyLines);
}
/** @return bool */