'Return (whether the tag is on its own line, whether the tag is at
the very top of the string, whether the tag is at the very bottom of
the string).
Tolerates whitespace to the right of the tag: a tag with trailing
whitespace on the line can still be considered to be on its own line.'

@staticmethod
def _on_own_line(match, postspace):

    pos_before_tag = (match.start(2) - 1)
    if (pos_before_tag >= 0):
        at_left = (match.string[pos_before_tag] == '\n')
        at_top = False
    else:
        at_left = at_top = True
    at_bottom_modulo_space = (match.end(4) == len(match.string))
    at_right_modulo_space = (at_bottom_modulo_space or ('\n' in postspace))
    return ((at_left and at_right_modulo_space), at_top, at_bottom_modulo_space)
