From e4cd13350b11f676afa0fd1e270078f65d0a0cff Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Mon, 9 Apr 2018 15:11:45 +0100 Subject: [PATCH] Remove setLiteralBreaks --- Parsedown.php | 21 ++------------------- test/ParsedownTest.php | 1 - test/data/literal_breaks.html | 6 ------ test/data/literal_breaks.md | 6 ------ 4 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 test/data/literal_breaks.html delete mode 100644 test/data/literal_breaks.md diff --git a/Parsedown.php b/Parsedown.php index ffdc83d..e62ddd3 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -65,15 +65,6 @@ class Parsedown protected $breaksEnabled; - function setLiteralBreaks($literalBreaks) - { - $this->literalBreaks = $literalBreaks; - - return $this; - } - - protected $literalBreaks; - function setMarkupEscaped($markupEscaped) { $this->markupEscaped = $markupEscaped; @@ -179,7 +170,7 @@ class Parsedown foreach ($lines as $line) { - if ( ! $this->literalBreaks and chop($line) === '') + if (chop($line) === '') { if (isset($CurrentBlock)) { @@ -244,15 +235,7 @@ class Parsedown # ~ - if (isset($text[0])) - { - $marker = $text[0]; - } - elseif ($this->literalBreaks) - { - $marker = '\n'; - $text = ' '; - } + $marker = $text[0]; # ~ diff --git a/test/ParsedownTest.php b/test/ParsedownTest.php index d92e4fc..bf40317 100755 --- a/test/ParsedownTest.php +++ b/test/ParsedownTest.php @@ -52,7 +52,6 @@ class ParsedownTest extends TestCase $this->Parsedown->setSafeMode(substr($test, 0, 3) === 'xss'); $this->Parsedown->setStrictMode(substr($test, 0, 6) === 'strict'); - $this->Parsedown->setLiteralBreaks(substr($test, 0, 14) === 'literal_breaks'); $actualMarkup = $this->Parsedown->text($markdown); diff --git a/test/data/literal_breaks.html b/test/data/literal_breaks.html deleted file mode 100644 index bf9e273..0000000 --- a/test/data/literal_breaks.html +++ /dev/null @@ -1,6 +0,0 @@ -

first line -
-
-
-
-sixth line

\ No newline at end of file diff --git a/test/data/literal_breaks.md b/test/data/literal_breaks.md deleted file mode 100644 index 2b95a92..0000000 --- a/test/data/literal_breaks.md +++ /dev/null @@ -1,6 +0,0 @@ -first line - - - - -sixth line \ No newline at end of file