mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
rtrim non hard breaking lines
This commit is contained in:
parent
fc37ad11ed
commit
74bba0b2fa
@ -55,6 +55,8 @@ final class PlainText implements Inline
|
||||
$Renderables = [];
|
||||
$text = $this->text;
|
||||
|
||||
$text = \preg_replace('/(?<![ \t])[ ]\n/', "$1\n", $text);
|
||||
|
||||
while (\preg_match('/(?:[ ]*+\\\\|[ ]{2,}+)\n/', $text, $matches, \PREG_OFFSET_CAPTURE)) {
|
||||
$offset = \intval($matches[0][1]);
|
||||
$before = \substr($text, 0, $offset);
|
||||
|
Loading…
Reference in New Issue
Block a user