'Calculate the heading rank of this token'

def _getHeadingRank(self, token):

    if (not self._isHeading(token)):
        return None
    if (token['name'] != 'hgroup'):
        return int(token['name'][1])
    else:
        return 1
