Changeset 119:5c2412920bff

Show
Ignore:
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:
1 modified

Legend:

Unmodified
Added
Removed
  • relatorio/templates/opendocument.py

    r115 r119  
    127127    """ 
    128128    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 
    129136    for node in first.itersiblings(): 
    130137        if node is last: