dj_angles.replacers.attributes.elements¶
Module Contents¶
- class dj_angles.replacers.attributes.elements.Element¶
Represents an HTML element with a dj-* attribute.
- full_end: int¶
Position just after the element’s closing tag, or
tag_endfor void/self-closing tags.
- value: str = ''¶
The value of the dj-* attribute, e.g. the condition for
dj-ifor the variable fordj-value.
- classmethod from_match(html: str, match: re.Match, attr_type: str) Element¶
Find the HTML element containing a dj-* attribute match and return an instance.
- make_edit(content: str, *, replace: bool = False) dj_angles.replacers.objects.AtomicEdit¶
Convenience: insert
contentattag_start, optionally replacing the opening tag.
- class dj_angles.replacers.attributes.elements.ConditionalElement¶
Bases:
ElementRepresents an element with a dj-if/elif/else attribute.
- next_in_chain: ConditionalElement | None = None¶
- class dj_angles.replacers.attributes.elements.ForElement¶
Bases:
ElementRepresents an element with a dj-for/dj-empty/dj-endfor attribute.
- empty_sibling: ForElement | None = None¶
The linked dj-empty element, if any.