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

Method inline_close_follows

markdown/htmlparser.py:284–289  ·  view source on GitHub ↗

Return `True` if an open inline tag is closed in the same paragraph after the comment `text`.

(self, text: str)

Source from the content-addressed store, hash-verified

282 break
283
284 def inline_close_follows(self, text: str) -> bool:
285 """ Return `True` if an open inline tag is closed in the same paragraph after the comment `text`. """
286 if not self.inline_stack:
287 return False
288 rest = inner_blank_line_re.split(self.rawdata[self.line_offset + self.offset + len(text):], 1)[0]
289 return any(re.search(r'</\s*{}\s*>'.format(re.escape(tag)), rest, re.I) for tag in self.inline_stack)
290
291 def handle_data(self, data: str):
292 if self.intail and '\n' in data:

Callers 1

handle_commentMethod · 0.95

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected