new MainConfig]);
$this->assertEquals("
Test
\n", $converter->convertToHtml('# Test'));
}
function testTOCToken() {
$converter = new CommonMarkConverter(['daux' => new MainConfig]);
$source = "[TOC]\n# Title";
$expected = <<
Title
Title
EXPECTED;
$this->assertEquals($expected, $converter->convertToHtml($source));
}
function testUnicodeTOC() {
$converter = new CommonMarkConverter(['daux' => new MainConfig]);
$source = "[TOC]\n# 基础操作";
$expected = <<
基础操作
基础操作
EXPECTED;
$this->assertEquals($expected, $converter->convertToHtml($source));
}
}