(self, i, report=True)
| 319 | # Internal -- parse comment, return length or -1 if not terminated |
| 320 | # see https://html.spec.whatwg.org/multipage/parsing.html#comment-start-state |
| 321 | def parse_comment(self, i, report=True): |
| 322 | rawdata = self.rawdata |
| 323 | assert rawdata.startswith('<!--', i), 'unexpected call to parse_comment()' |
| 324 | match = commentclose.search(rawdata, i+4) |
| 325 | if not match: |
| 326 | self.handle_data('<') |
| 327 | return i + 1 |
| 328 | if report: |
| 329 | j = match.start() |
| 330 | self.handle_comment(rawdata[i+4: j]) |
| 331 | return match.end() |
| 332 | |
| 333 | def parse_html_declaration(self, i: int) -> int: |
| 334 | if self.at_line_start() or self.intail: |
nothing calls this directly
no test coverage detected