MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / parse_bogus_comment

Method parse_bogus_comment

markdown/htmlparser.py:396–403  ·  view source on GitHub ↗
(self, i: int, report: int = 0)

Source from the content-addressed store, hash-verified

394 return i + 2
395
396 def parse_bogus_comment(self, i: int, report: int = 0) -> int:
397 # Override the default behavior so that bogus comments get passed
398 # through unaltered by setting `report` to `0` (see #1425).
399 pos = super().parse_bogus_comment(i, report)
400 if pos == -1: # pragma: no cover
401 return -1
402 self.handle_empty_tag(self.rawdata[i:pos], is_block=False)
403 return pos
404
405 # The rest has been copied from base class in standard lib to address #1036.
406 # As `__startag_text` is private, all references to it must be in this subclass.

Callers 2

Calls 1

handle_empty_tagMethod · 0.95

Tested by

no test coverage detected