MCPcopy
hub / github.com/django/django / handle_endtag

Method handle_endtag

django/utils/text.py:126–133  ·  view source on GitHub ↗
(self, tag)

Source from the content-addressed store, hash-verified

124 self.tags.appendleft(tag)
125
126 def handle_endtag(self, tag):
127 if tag not in self.void_elements:
128 self.output.append(f"</{tag}>")
129 # Remove from the stack only if the tag matches the most recently
130 # opened tag (LIFO). This avoids O(n) linear scans for unmatched
131 # end tags if `deque.remove()` would be called.
132 if self.tags and self.tags[0] == tag:
133 self.tags.popleft()
134
135 def handle_data(self, data):
136 data, output = self.process(data)

Callers 1

handle_startendtagMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected