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

Method isblocklevel

markdown/postprocessors.py:95–103  ·  view source on GitHub ↗

Check is block of HTML is block-level.

(self, html: str)

Source from the content-addressed store, hash-verified

93 return text
94
95 def isblocklevel(self, html: str) -> bool:
96 """ Check is block of HTML is block-level. """
97 m = self.BLOCK_LEVEL_REGEX.match(html)
98 if m:
99 if m.group(1)[0] in ('!', '?', '@', '%'):
100 # Comment, PHP etc...
101 return True
102 return self.md.is_block_level(m.group(1))
103 return False
104
105 def stash_to_string(self, text: str) -> str:
106 """ Convert a stashed object to a string. """

Callers 1

substitute_matchMethod · 0.95

Calls 1

is_block_levelMethod · 0.80

Tested by

no test coverage detected