Changeset 70e8239


Ignore:
Timestamp:
08/22/10 08:21:44 (3 years ago)
Author:
Aurélien Bompard <aurelien@…>
Branches:
master
Children:
6ddce7b
Parents:
e5ae7b4
git-author:
Aurélien Bompard <aurelien@…> (08/22/10 08:21:44)
git-committer:
Aurélien Bompard <aurelien@…> (08/22/10 08:21:44)
Message:

Accept paragraphs inside paragraph-like elements (like table cells)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/test_paragraph.py

    r30e2066 r70e8239  
    118118""" 
    119119 
     120    def test_p_inside_p(self): 
     121        html = '<html xmlns="http://www.w3.org/1999/xhtml"><table><tr><td><p>Test</p></td></tr></table></html>' 
     122        odt = xhtml2odt(html) 
     123        print odt 
     124        self.assertEquals(str(odt).count("Test"), 1, 
     125            "Paragraphs inside paragraph-like elements should be accepted") 
     126 
    120127 
    121128if __name__ == '__main__': 
  • xsl/document-content/paragraph.xsl

    r7c1f2b3 r70e8239  
    5555    <xsl:call-template name="paragraph"/> 
    5656</xsl:template> 
    57 <xsl:template match="h:p" mode="inparagraph"/> 
     57<xsl:template match="h:p" mode="inparagraph"> 
     58    <xsl:apply-templates/> 
     59</xsl:template> 
    5860 
    5961<xsl:template name="paragraph"> 
Note: See TracChangeset for help on using the changeset viewer.