Changeset 104:65a41313fe3a
- Timestamp:
- 01/23/09 03:50:32 (18 months ago)
- Author:
- Ga?tan de Menten <ged@…>
- Branch:
- default
- Message:
-
fix the case where the opening directive and closing directive are on the same
line without any style (ie the outermost_x_ancestors are the opening and
closing tags themselves).
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r103
|
r104
|
|
| 296 | 296 | # - we find the nearest common ancestor of the closing and |
| 297 | 297 | # opening statements |
| 298 | | o_ancestors = [] |
| 299 | | c_ancestors = list(closing.iterancestors()) |
| | 298 | o_ancestors = [opening] |
| | 299 | c_ancestors = [closing] + list(closing.iterancestors()) |
| 300 | 300 | ancestor = None |
| 301 | 301 | for node in opening.iterancestors(): |
| … |
… |
|
| 314 | 314 | assert ancestor is not None, \ |
| 315 | 315 | "No common ancestor found for opening and closing tag" |
| | 316 | |
| 316 | 317 | outermost_o_ancestor = o_ancestors[-1] |
| 317 | 318 | outermost_c_ancestor = c_ancestors[-1] |