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

Method search

markdown/inlinepatterns.py:871–883  ·  view source on GitHub ↗

Search.

(self, data: str, start: int)

Source from the content-addressed store, hash-verified

869 return None
870
871 def search(self, data: str, start: int) -> re.Match[str] | None:
872 """Search."""
873
874 for i in range(start, len(data)):
875 if data[i] in self.delimiters:
876 self.positions.append(i)
877 d = self.delimiters[data[i]]
878 m = d.boundary.match(data, i)
879 if m is not None:
880 if not d.stack and m.lastgroup[0] == 'e': # type: ignore[index]
881 continue
882 return m
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."""

Callers 15

_handle_matchMethod · 0.95
get_frontmatterFunction · 0.80
get_endtag_textMethod · 0.80
inline_close_followsMethod · 0.80
handle_dataMethod · 0.80
handle_commentMethod · 0.80
parse_commentMethod · 0.80
testMethod · 0.80
runMethod · 0.80
testMethod · 0.80
runMethod · 0.80
testMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected