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

Trim paragraph contents

This commit is contained in:
Aidan Woods 2019-01-27 20:54:09 +00:00
parent 0f55cd5b26
commit 3dd1326ded
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ final class Paragraph implements ContinuableBlock
return new Element(
'p',
[],
$State->applyTo(Parsedown::line($this->text, $State))
$State->applyTo(Parsedown::line(\trim($this->text), $State))
);
}
);

View File

@ -1,5 +1,5 @@
<p><a href="http://example.com">link</a></p>
<p><a href="/url-(parentheses)">link</a> with parentheses in URL </p>
<p><a href="/url-(parentheses)">link</a> with parentheses in URL</p>
<p>(<a href="/index.php">link</a>) in parentheses</p>
<p><a href="http://example.com"><code>link</code></a></p>
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /></a></p>

View File

@ -13,4 +13,4 @@
</ol>
<p>foo 1. the following should not start a list
100.<br />
200. </p>
200.</p>