Remove setLiteralBreaks

This commit is contained in:
Aidan Woods 2018-04-09 15:11:45 +01:00
parent ae8067e862
commit e4cd13350b
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
4 changed files with 2 additions and 32 deletions

View File

@ -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];
# ~

View File

@ -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);

View File

@ -1,6 +0,0 @@
<p>first line
<br />
<br />
<br />
<br />
sixth line</p>

View File

@ -1,6 +0,0 @@
first line
sixth line