* @group github */ class GithubMarkdownTest extends BaseMarkdownTest { public function createMarkdown() { return new GithubMarkdown(); } public function getDataPaths() { return [ 'markdown-data' => __DIR__ . '/markdown-data', 'github-data' => __DIR__ . '/github-data', ]; } public function testNewlines() { $markdown = $this->createMarkdown(); $this->assertEquals("This is text
\nnewline\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline.")); $markdown->enableNewlines = true; $this->assertEquals("This is text
\nnewline
\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline.")); $this->assertEquals("

This is text

\n

newline
\nnewline.

\n", $markdown->parse("This is text\n\nnewline\nnewline.")); } public function dataFiles() { $files = parent::dataFiles(); foreach($files as $i => $f) { // skip files that are different in github MD if ($f[0] === 'markdown-data' && ( $f[1] === 'list-marker-in-paragraph' || $f[1] === 'dense-block-markers' )) { unset($files[$i]); } } return $files; } }