(self)
| 399 | self.assertEqual(ids, {'foo', 'foo_1'}) |
| 400 | |
| 401 | def testTocInHeaders(self): |
| 402 | self.assertMarkdownRenders( |
| 403 | self.dedent( |
| 404 | ''' |
| 405 | [TOC] |
| 406 | #[TOC] |
| 407 | ''' |
| 408 | ), |
| 409 | '<div class="toc">\n' # noqa |
| 410 | '<ul>\n' # noqa |
| 411 | '<li><a href="#toc">[TOC]</a></li>\n' # noqa |
| 412 | '</ul>\n' # noqa |
| 413 | '</div>\n' # noqa |
| 414 | '<h1 id="toc">[TOC]</h1>' # noqa |
| 415 | ) |
| 416 | |
| 417 | self.assertMarkdownRenders( |
| 418 | self.dedent( |
| 419 | ''' |
| 420 | #[TOC] |
| 421 | [TOC] |
| 422 | ''' |
| 423 | ), |
| 424 | '<h1 id="toc">[TOC]</h1>\n' # noqa |
| 425 | '<div class="toc">\n' # noqa |
| 426 | '<ul>\n' # noqa |
| 427 | '<li><a href="#toc">[TOC]</a></li>\n' # noqa |
| 428 | '</ul>\n' # noqa |
| 429 | '</div>' # noqa |
| 430 | ) |
| 431 | |
| 432 | self.assertMarkdownRenders( |
| 433 | self.dedent( |
| 434 | ''' |
| 435 | [TOC] |
| 436 | # *[TOC]* |
| 437 | ''' |
| 438 | ), |
| 439 | '<div class="toc">\n' # noqa |
| 440 | '<ul>\n' # noqa |
| 441 | '<li><a href="#toc">[TOC]</a></li>\n' # noqa |
| 442 | '</ul>\n' # noqa |
| 443 | '</div>\n' # noqa |
| 444 | '<h1 id="toc"><em>[TOC]</em></h1>' # noqa |
| 445 | ) |
| 446 | |
| 447 | def testTOCPermalink(self): |
| 448 | self.assertMarkdownRenders( |
nothing calls this directly
no test coverage detected