normalizeLineEndings($xhtml); } /** * C-style comment syntax */ function test_cstyle_syntax() { $text = "\nWiki /* comment out */ text\n"; $expectHtml = '

Wiki text

'; $this->assertEquals($expectHtml, $this->getHtml($text)); $text = <<<'EOS' * item 1 /** item 2 omit this line! */ * item 3 EOS; $expectHtml = ''; $this->assertEquals($expectHtml, $this->getHtml($text)); // nested comment $text = <<<'EOS' /** item 1 /** item 2 omit this line! */ * item 3 */ * item 4 EOS; $expectHtml = ''; $this->assertEquals($expectHtml, $this->getHtml($text)); } /** * One line comment */ function test_oneline_syntax() { $text = "\nWiki text // allow slash (/) in one line comment\n"; $expectHtml = '

Wiki text

'; $this->assertEquals($expectHtml, $this->getHtml($text)); $text = "\nWiki //text// // allow slash (/) in one line comment\n"; $expectHtml = '

Wiki text

'; $this->assertEquals($expectHtml, $this->getHtml($text)); } } // vim:set fileencoding=utf-8 :