MCPcopy
hub / github.com/pyload/pyload / EndBracketRegEx

Class EndBracketRegEx

module/lib/feedparser.py:233–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231
232if sgmllib.endbracket.search(' <').start(0):
233 class EndBracketRegEx:
234 def __init__(self):
235 # Overriding the built-in sgmllib.endbracket regex allows the
236 # parser to find angle brackets embedded in element attributes.
237 self.endbracket = re.compile('''([^'"<>]|"[^"]*"(?=>|/|\s|\w+=)|'[^']*'(?=>|/|\s|\w+=))*(?=[<>])|.*?(?=[<>])''')
238 def search(self,string,index=0):
239 match = self.endbracket.match(string,index)
240 if match is not None:
241 # Returning a new object in the calling thread's context
242 # resolves a thread-safety.
243 return EndBracketMatch(match)
244 return None
245 class EndBracketMatch:
246 def __init__(self, match):
247 self.match = match

Callers 1

feedparser.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected