MCPcopy Create free account
hub / github.com/EasyIME/PIME / _Text

Class _Text

python/python3/tornado/template.py:682–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680
681
682class _Text(_Node):
683 def __init__(self, value: str, line: int, whitespace: str) -> None:
684 self.value = value
685 self.line = line
686 self.whitespace = whitespace
687
688 def generate(self, writer: "_CodeWriter") -> None:
689 value = self.value
690
691 # Compress whitespace if requested, with a crude heuristic to avoid
692 # altering preformatted whitespace.
693 if "<pre>" not in value:
694 value = filter_whitespace(self.whitespace, value)
695
696 if value:
697 writer.write_line("_tt_append(%r)" % escape.utf8(value), self.line)
698
699
700class ParseError(Exception):

Callers 1

_parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected