MCPcopy Index your code
hub / github.com/clips/pattern / _EndBracketRegEx

Class _EndBracketRegEx

pattern/web/feed/feedparser.py:244–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 starttagopen = sgmllib.starttagopen
243
244 class _EndBracketRegEx:
245 def __init__(self):
246 # Overriding the built-in sgmllib.endbracket regex allows the
247 # parser to find angle brackets embedded in element attributes.
248 self.endbracket = re.compile('''([^'"<>]|"[^"]*"(?=>|/|\s|\w+=)|'[^']*'(?=>|/|\s|\w+=))*(?=[<>])|.*?(?=[<>])''')
249 def search(self, target, index=0):
250 match = self.endbracket.match(target, index)
251 if match is not None:
252 # Returning a new object in the calling thread's context
253 # resolves a thread-safety.
254 return EndBracketMatch(match)
255 return None
256 class EndBracketMatch:
257 def __init__(self, match):
258 self.match = match

Callers 1

feedparser.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…