(self)
| 130 | self.assertEqual(len(toc), 2) |
| 131 | |
| 132 | def test_nested_anchor(self): |
| 133 | md = dedent( |
| 134 | """ |
| 135 | # Heading 1 |
| 136 | ## Heading 2 |
| 137 | # Heading 3 |
| 138 | ### Heading 4 |
| 139 | ### <a href="/">Heading 5</a> |
| 140 | """ |
| 141 | ) |
| 142 | expected = dedent( |
| 143 | """ |
| 144 | Heading 1 - #heading-1 |
| 145 | Heading 2 - #heading-2 |
| 146 | Heading 3 - #heading-3 |
| 147 | Heading 4 - #heading-4 |
| 148 | Heading 5 - #heading-5 |
| 149 | """ |
| 150 | ) |
| 151 | toc = get_toc(get_markdown_toc(md)) |
| 152 | self.assertEqual(str(toc).strip(), expected) |
| 153 | self.assertEqual(len(toc), 2) |
| 154 | |
| 155 | def test_entityref(self): |
| 156 | md = dedent( |
nothing calls this directly
no test coverage detected