Show
Ignore:
Timestamp:
03/24/09 14:56:11 (4 years ago)
Author:
Nicolas ?vrard <nicoe@…>
Parents:
120:e103a74a8d84 (diff), 119:5c2412920bff (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.
Branch:
default
Message:

Merge with openhex-branch

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

Legend:

Unmodified
Added
Removed
  • relatorio/templates/opendocument.py

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

    r120 r121  
    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: