From 3dd1326deda7bd16f27b2ace52235225fed84074 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 27 Jan 2019 20:54:09 +0000 Subject: [PATCH] Trim paragraph contents --- src/Components/Blocks/Paragraph.php | 2 +- tests/data/inline_link.html | 2 +- tests/data/ordered_list.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Blocks/Paragraph.php b/src/Components/Blocks/Paragraph.php index acf4b21..7d4b7d4 100644 --- a/src/Components/Blocks/Paragraph.php +++ b/src/Components/Blocks/Paragraph.php @@ -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)) ); } ); diff --git a/tests/data/inline_link.html b/tests/data/inline_link.html index cef29cf..cab4452 100644 --- a/tests/data/inline_link.html +++ b/tests/data/inline_link.html @@ -1,5 +1,5 @@

link

-

link with parentheses in URL

+

link with parentheses in URL

(link) in parentheses

link

MD Logo

diff --git a/tests/data/ordered_list.html b/tests/data/ordered_list.html index b748fc1..e118d08 100644 --- a/tests/data/ordered_list.html +++ b/tests/data/ordered_list.html @@ -13,4 +13,4 @@

foo 1. the following should not start a list 100.
-200.

\ No newline at end of file +200.

\ No newline at end of file