MCPcopy
hub / github.com/django/django / process

Method process

django/utils/text.py:167–175  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

165 )
166
167 def process(self, data):
168 self.processed_chars += len(data)
169 if (self.processed_chars == self.length) and (
170 sum(len(p) for p in self.output) + len(data) == len(self.rawdata)
171 ):
172 self.output.append(data)
173 raise self.TruncationCompleted
174 output = escape("".join(data[: self.remaining]))
175 return data, output
176
177
178class TruncateWordsHTMLParser(TruncateHTMLParser):

Callers 1

handle_dataMethod · 0.45

Calls 3

escapeFunction · 0.90
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected