| 130 | self.parse(node.documentElement) |
| 131 | |
| 132 | def parse_Text(self, node): |
| 133 | txt = node.data |
| 134 | |
| 135 | txt = txt.replace("\\", r"\\\\") |
| 136 | txt = txt.replace('"', r"\"") |
| 137 | |
| 138 | if self.java: |
| 139 | txt = txt.replace("&", "&") |
| 140 | txt = txt.replace("<", "<") |
| 141 | txt = txt.replace(">", ">") |
| 142 | |
| 143 | # ignore pure whitespace |
| 144 | m = self.space_re.match(txt) |
| 145 | if m and len(m.group()) == len(txt): |
| 146 | pass |
| 147 | else: |
| 148 | # if we're in a "See" node and starting a new line, indent one space |
| 149 | if self.insideSee and len(self.pieces) and self.pieces[-1][-1] == "\n": |
| 150 | self.add_text(" ") |
| 151 | if node.parentNode.nodeName != "definition": |
| 152 | txt = textwrap.fill(txt) |
| 153 | self.add_text(txt) |
| 154 | |
| 155 | def parse_Element(self, node): |
| 156 | """Parse an `ELEMENT_NODE`. This calls specific |