| Name | Size | Mode | Actions |
|---|---|---|---|
| extra-data/ | - | 0755 | rm |
| github-data/ | - | 0755 | rm |
| markdown-data/ | - | 0755 | rm |
| markdown-ol-start-num-data/ | - | 0755 | rm |
| BaseMarkdownTest.php | 3776 | 0644 | editdlrm |
| bootstrap.php | 112 | 0644 | editdlrm |
| GithubMarkdownTest.php | 2567 | 0644 | editdlrm |
| MarkdownExtraTest.php | 408 | 0644 | editdlrm |
| MarkdownOLStartNumTest.php | 691 | 0644 | editdlrm |
| MarkdownTest.php | 1863 | 0644 | editdlrm |
| ParserTest.php | 2583 | 0644 | editdlrm |
| profile.php | 925 | 0644 | editdlrm |
/var/www/vhosts/nabawater/vendor/cebe/markdown/tests/ParserTest.php (2583B)
Result is A
\n", $parser->parse('Result is [abc]')); $this->assertEquals("Result is B
\n", $parser->parse('Result is [[abc]]')); $this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]')); $this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]')); $parser = new TestParser(); $parser->markers = [ '[[' => 'parseMarkerB', '[' => 'parseMarkerA', ]; $this->assertEquals("Result is A
\n", $parser->parse('Result is [abc]')); $this->assertEquals("Result is B
\n", $parser->parse('Result is [[abc]]')); $this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]')); $this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]')); } public function testMaxNestingLevel() { $parser = new TestParser(); $parser->markers = [ '[' => 'parseMarkerC', ]; $parser->maximumNestingLevel = 3; $this->assertEquals("(C-a(C-b(C-c)))", $parser->parseParagraph('[a[b[c]]]')); $parser->maximumNestingLevel = 2; $this->assertEquals("(C-a(C-b[c]))", $parser->parseParagraph('[a[b[c]]]')); $parser->maximumNestingLevel = 1; $this->assertEquals("(C-a[b[c]])", $parser->parseParagraph('[a[b[c]]]')); } public function testKeepZeroAlive() { $parser = new TestParser(); $this->assertEquals("0", $parser->parseParagraph("0")); $this->assertEquals("0
\n", $parser->parse("0")); } } class TestParser extends Parser { public $markers = []; protected function inlineMarkers() { return $this->markers; } protected function parseMarkerA($text) { return [['text', 'A'], strrpos($text, ']') + 1]; } protected function parseMarkerB($text) { return [['text', 'B'], strrpos($text, ']') + 1]; } protected function parseMarkerC($text) { $terminatingMarkerPos = strrpos($text, ']'); $inside = $this->parseInline(substr($text, 1, $terminatingMarkerPos - 1)); return [['text', '(C-' . $this->renderAbsy($inside) . ')'], $terminatingMarkerPos + 1]; } }