MCPcopy Create free account
hub / github.com/aaronsw/html2text / hn

Function hn

html2text.py:146–151  ·  view source on GitHub ↗
(tag)

Source from the content-addressed store, hash-verified

144 return result
145
146def hn(tag):
147 if tag[0] == 'h' and len(tag) == 2:
148 try:
149 n = int(tag[1])
150 if n in range(1, 10): return n
151 except ValueError: return 0
152
153class _html2text(HTMLParser.HTMLParser):
154 def __init__(self, out=None, baseurl=''):

Callers 1

handle_tagMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected