dj_angles.htmls¶
Module Contents¶
- dj_angles.htmls.VOID_ELEMENTS¶
- dj_angles.htmls.get_outer_html(html: str, start_idx: int) dj_angles.tags.Tag | None ¶
Get the outer HTML for just the tag at a given index.
Will not return HTML before the beginning of the tag or after the ending tag.
Example
>>> tag = get_outer_html("<span></span><div dj-if='True'><p>test</p></div><span></span>", 14) >>> tag.outer_html "<div dj-if='True'><p>test</p></div>"