Changeset 90:fa49e2a2d973
- Timestamp:
- 01/15/09 07:43:30 (14 months ago)
- Author:
- Ga?tan de Menten <ged@…>
- Branch:
- default
- Message:
-
further simplification/optimization
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r89
|
r90
|
|
| 265 | 265 | # - we add all the nodes between the opening and closing |
| 266 | 266 | # statements to this new node |
| 267 | | can_append = False |
| 268 | | for node in ancestor.iterchildren(): |
| 269 | | if node in o_ancestors: |
| 270 | | outermost_o_ancestor = node |
| 271 | | assert outermost_o_ancestor == o_ancestors[-1] |
| 272 | | can_append = True |
| 273 | | continue |
| 274 | | if node in c_ancestors: |
| 275 | | outermost_c_ancestor = node |
| 276 | | assert outermost_c_ancestor == c_ancestors[-1] |
| | 267 | outermost_o_ancestor = o_ancestors[-1] |
| | 268 | outermost_c_ancestor = c_ancestors[-1] |
| | 269 | for node in outermost_o_ancestor.itersiblings(): |
| | 270 | if node is outermost_c_ancestor: |
| 277 | 271 | break |
| 278 | | if can_append: |
| 279 | | # we are between the opening and closing node |
| 280 | | genshi_node.append(node) |
| | 272 | genshi_node.append(node) |
| 281 | 273 | |
| 282 | 274 | # - we replace the opening statement by the <py:xxx> node |