code: def _get_level(tag):
          
          m = re.match(r'^h([123456])$', tag, flags=re.IGNORECASE)
          if not m:
              return None
          return int(m.group(1))
docs: Match the header level in the given tag name,
          or None if it's not a header tag.