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

Method add_region

markdown/inlinepatterns.py:885–896  ·  view source on GitHub ↗

Add region.

(self, delim: Delimiter, a: int, b: int, c: int, d: int, size: int)

Source from the content-addressed store, hash-verified

883 return None
884
885 def add_region(self, delim: Delimiter, a: int, b: int, c: int, d: int, size: int) -> None:
886 """Add region."""
887
888 self.regions.append((a, b, c, d, delim.tags, size))
889 # Unpaired delimiters inside the new region can no longer be used, drop them
890 for other in self.delimiters.values():
891 while other.stack:
892 p = other.stack[-1][0]
893 if max(p, a) <= min(p, d - 1):
894 other.stack.pop()
895 continue
896 break
897
898 def handleMatch( # type: ignore[override]
899 self,

Callers 1

_handle_matchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected