MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / flush_text

Method flush_text

thirdparty/bottle/bottle.py:4579–4598  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4577 return offset
4578
4579 def flush_text(self):
4580 text = ''.join(self.text_buffer)
4581 del self.text_buffer[:]
4582 if not text: return
4583 parts, pos, nl = [], 0, '\\\n' + ' ' * self.indent
4584 for m in self.re_inl.finditer(text):
4585 prefix, pos = text[pos:m.start()], m.end()
4586 if prefix:
4587 parts.append(nl.join(map(repr, prefix.splitlines(True))))
4588 if prefix.endswith('\n'): parts[-1] += nl
4589 parts.append(self.process_inline(m.group(1).strip()))
4590 if pos < len(text):
4591 prefix = text[pos:]
4592 lines = prefix.splitlines(True)
4593 if lines[-1].endswith('\\\\\n'): lines[-1] = lines[-1][:-3]
4594 elif lines[-1].endswith('\\\\\r\n'): lines[-1] = lines[-1][:-4]
4595 parts.append(nl.join(map(repr, lines)))
4596 code = '_printlist((%s,))' % ', '.join(parts)
4597 self.lineno += code.count('\n') + 1
4598 self.write_code(code)
4599
4600 @staticmethod
4601 def process_inline(chunk):

Callers 1

translateMethod · 0.95

Calls 4

process_inlineMethod · 0.95
write_codeMethod · 0.95
startMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected