mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Remove setLiteralBreaks
This commit is contained in:
parent
ae8067e862
commit
e4cd13350b
@ -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 = ' ';
|
||||
}
|
||||
|
||||
# ~
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
<p>first line
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
sixth line</p>
|
@ -1,6 +0,0 @@
|
||||
first line
|
||||
|
||||
|
||||
|
||||
|
||||
sixth line
|
Loading…
Reference in New Issue
Block a user