mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Add breaks configurable
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Erusev\Parsedown\Tests;
|
||||
|
||||
use Erusev\Parsedown\Configurables\Breaks;
|
||||
use Erusev\Parsedown\Configurables\SafeMode;
|
||||
use Erusev\Parsedown\Configurables\StrictMode;
|
||||
use Erusev\Parsedown\Parsedown;
|
||||
@@ -47,6 +48,7 @@ class ParsedownTest extends TestCase
|
||||
$Parsedown = new Parsedown(new State([
|
||||
new SafeMode(\substr($test, 0, 3) === 'xss'),
|
||||
new StrictMode(\substr($test, 0, 6) === 'strict'),
|
||||
new Breaks(\substr($test, 0, 14) === 'breaks_enabled'),
|
||||
]));
|
||||
|
||||
$actualMarkup = $Parsedown->text($markdown);
|
||||
|
||||
2
tests/data/breaks_enabled.html
Normal file
2
tests/data/breaks_enabled.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>line<br />
|
||||
anotherline</p>
|
||||
2
tests/data/breaks_enabled.md
Normal file
2
tests/data/breaks_enabled.md
Normal file
@@ -0,0 +1,2 @@
|
||||
line
|
||||
anotherline
|
||||
Reference in New Issue
Block a user