assertEquals('
test
', $sut->toHtml('*test*'));
$this->assertEquals('# foobar
', $sut->toHtml('# foobar'));
$html = <<<'EOT'
foo bar
# test
asdfasdfa
ssdfsdf
http://example.com/foo-bar.html
file:///home/kimai/images/beautiful-flower.png
sdfsdf asdfasdf asdfasdf
# test
aasdfasdf
1111
222
EOT;
$markdown = <<assertEquals($html, $sut->toHtml($markdown));
}
public function testDuplicateIds()
{
$sut = new Markdown();
$html = <<<'EOT'
# test
## test
### test
# test
EOT;
$markdown = <<assertEquals($html, $sut->toHtml($markdown));
}
public function testLinksAreSanitized()
{
$sut = new Markdown();
$html = <<<'EOT'
XSS
XSS
XSS
EOT;
$markdown = <<assertEquals($html, $sut->toHtml($markdown));
}
}