(self)
| 153 | self.assertEqual(len(toc), 2) |
| 154 | |
| 155 | def test_entityref(self): |
| 156 | md = dedent( |
| 157 | """ |
| 158 | # Heading & 1 |
| 159 | ## Heading > 2 |
| 160 | ### Heading < 3 |
| 161 | """ |
| 162 | ) |
| 163 | expected = dedent( |
| 164 | """ |
| 165 | Heading & 1 - #heading-1 |
| 166 | Heading > 2 - #heading-2 |
| 167 | Heading < 3 - #heading-3 |
| 168 | """ |
| 169 | ) |
| 170 | toc = get_toc(get_markdown_toc(md)) |
| 171 | self.assertEqual(str(toc).strip(), expected) |
| 172 | self.assertEqual(len(toc), 1) |
| 173 | |
| 174 | def test_charref(self): |
| 175 | md = '# @Header' |
nothing calls this directly
no test coverage detected