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

Method parse_pi

markdown/htmlparser.py:351–357  ·  view source on GitHub ↗
(self, i: int)

Source from the content-addressed store, hash-verified

349 self.handle_empty_tag('<![{}{}'.format(data, end), is_block=True)
350
351 def parse_pi(self, i: int) -> int:
352 if self.at_line_start() or self.intail:
353 return super().parse_pi(i)
354 # This is not the beginning of a raw block so treat as plain data
355 # and avoid consuming any tags which may follow (see #1066).
356 self.handle_data('<?')
357 return i + 2
358
359 # Internal -- parse comment, return length or -1 if not terminated
360 # see https://html.spec.whatwg.org/multipage/parsing.html#comment-start-state

Callers

nothing calls this directly

Calls 2

at_line_startMethod · 0.95
handle_dataMethod · 0.95

Tested by

no test coverage detected