

@ensure_tag(['p'])
def whole_line_styled(p):
    '\n    Checks to see if the whole p tag will end up being bold or italics. Returns\n    a tuple (boolean, boolean). The first boolean will be True if the whole\n    line is bold, False otherwise. The second boolean will be True if the whole\n    line is italics, False otherwise.\n    '
    r_tags = p.xpath('.//w:r', namespaces=p.nsmap)
    tags_are_bold = [(is_bold(r) or is_underlined(r)) for r in r_tags]
    tags_are_italics = [is_italics(r) for r in r_tags]
    return (all(tags_are_bold), all(tags_are_italics))

dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py whole_line_styled/original