Changeset 124:7cac12720969

Show
Ignore:
Timestamp:
03/24/09 10:45:58 (16 months ago)
Author:
Ga?tan de Menten <ged@…>
Parents:
122:df824ebd5734 (diff), 123:dfee8d6b2bca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Children:
125:a05226654d45, 127:5a66f1d61a0c
Branch:
default
Message:

Backed out e103a74a8d84. We still want python2.4 compatibility for now.

Location:
relatorio/templates/opendocument.py
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • relatorio/templates/opendocument.py

    r121 r124  
    333333 
    334334                # - we create a <py:xxx> node 
    335                 attribs = {attr: a_val} if attr is not None else {} 
     335                if attr is not None: 
     336                    attribs = {attr: a_val} 
     337                else: 
     338                    attribs = {} 
    336339                genshi_node = EtreeElement('{%s}%s' % (py_namespace, 
    337340                                                       directive), 
  • relatorio/templates/opendocument.py

    r123 r124  
    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: