Changeset 119:5c2412920bff
- Timestamp:
- 03/13/09 13:41:50 (17 months ago)
- Author:
- Ga?tan de Menten <ged@…>
- Branch:
- default
- Message:
-
fix issue #10 even if there is only text between the opening tag and the
closing tag.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r115
|
r119
|
|
| 127 | 127 | """ |
| 128 | 128 | old_parent = first.getparent() |
| | 129 | |
| | 130 | # Any text after the opening tag (and not within a tag) need to be handled |
| | 131 | # explicitly. For example in <if>xxx<span>yyy</span>zzz</if>, zzz is |
| | 132 | # copied along the span tag, but not xxx, which corresponds to the tail |
| | 133 | # attribute of the opening tag. |
| | 134 | if first.tail: |
| | 135 | new_parent.text = first.tail |
| 129 | 136 | for node in first.itersiblings(): |
| 130 | 137 | if node is last: |