

def _make_void_elements_self_close(html):
    void_tags = ['br', 'img']
    for tag in void_tags:
        regex = re.compile(('<%s.*?>' % void_tags))
        matches = regex.findall(html)
        for match in matches:
            new_tag = match.strip('<>')
            new_tag = ('<%s />' % new_tag)
            html = re.sub(match, new_tag, html)
    return html

dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py _make_void_elements_self_close/VarMisuse@34/52 `tag`->`void_tags`