(self, i, report=1)
| 400 | # Internal -- parse bogus comment, return length or -1 if not terminated |
| 401 | # see https://html.spec.whatwg.org/multipage/parsing.html#bogus-comment-state |
| 402 | def parse_bogus_comment(self, i, report=1): |
| 403 | rawdata = self.rawdata |
| 404 | assert rawdata[i:i+2] in ('<!', '</'), ('unexpected call to ' |
| 405 | 'parse_bogus_comment()') |
| 406 | pos = rawdata.find('>', i+2) |
| 407 | if pos == -1: |
| 408 | return -1 |
| 409 | if report: |
| 410 | self.handle_comment(rawdata[i+2:pos]) |
| 411 | return pos + 1 |
| 412 | |
| 413 | # Internal -- parse processing instr, return end or -1 if not terminated |
| 414 | def parse_pi(self, i): |
no test coverage detected