def _make_void_elements_self_close(html):
    #XXX Hack not sure how to get etree to do this by default.
    void_tags = [
        r'br',
        r'img',
    ]
    for tag in void_tags:
        regex = re.compile(r'<%s.*?>' % tag)
        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/operator `%` -> `+`