MCPcopy Create free account
hub / github.com/kurtmckee/feedparser / handle_decl

Method handle_decl

feedparser/html.py:281–291  ·  view source on GitHub ↗

:type text: str :rtype: None

(self, text)

Source from the content-addressed store, hash-verified

279 self.pieces.append('<?%s>' % text)
280
281 def handle_decl(self, text):
282 """
283 :type text: str
284 :rtype: None
285 """
286
287 # called for the DOCTYPE, if present, e.g.
288 # <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
289 # "http://www.w3.org/TR/html4/loose.dtd">
290 # Reconstruct original DOCTYPE
291 self.pieces.append('<!%s>' % text)
292
293 _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*').match
294

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected