MCPcopy Create free account
hub / github.com/Distrotech/reportlab / handle_data

Method handle_data

tools/pythonpoint/stdparser.py:245–265  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

243
244
245 def handle_data(self, data):
246 #the only data should be paragraph text, preformatted para
247 #text, 'string text' for a fixed string on the page,
248 #or table data
249 if self._curPara:
250 self._curPara.rawtext = self._curPara.rawtext + data
251 elif self._curPrefmt:
252 self._curPrefmt.rawtext = self._curPrefmt.rawtext + data
253 elif self._curPyCode:
254 self._curPyCode.rawtext = self._curPyCode.rawtext + data
255 elif self._curString:
256 self._curString.text = self._curString.text + data
257 elif self._curTable:
258 self._curTable.rawBlocks.append(data)
259 elif self._curTitle <> None: # need to allow empty strings,
260 # hence explicitly testing for None
261 self._curTitle = self._curTitle + data
262 elif self._curAuthor <> None:
263 self._curAuthor = self._curAuthor + data
264 elif self._curSubject <> None:
265 self._curSubject = self._curSubject + data
266
267 def handle_cdata(self, data):
268 #just append to current paragraph text, so we can quote XML

Callers 1

handle_charrefMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected