appy.shared.diff: bugfix: work internally on unicode representations of strings to diff: this way, we are sure every char is one char length.
This commit is contained in:
parent
40e8a5f258
commit
abdd0ee52d
4 changed files with 19 additions and 7 deletions
10
pod/parts.py
10
pod/parts.py
|
@ -31,11 +31,11 @@ class OdtTable:
|
|||
self.html = html
|
||||
|
||||
def dumpCell(self, content, span=1, header=False,
|
||||
paraStyle=None, cellStyle=None):
|
||||
paraStyle=None, cellStyle=None, align=None):
|
||||
'''Dumps a cell in the table. If no specific p_paraStyle (p_cellStyle)
|
||||
is given, self.paraStyle (self.cellStyle) is used, excepted if
|
||||
p_header is True: in that case, self.paraHeaderStyle
|
||||
(self.cellHeaderStyle) is used.'''
|
||||
(self.cellHeaderStyle) is used. p_align is used only for HTML.'''
|
||||
if not paraStyle:
|
||||
if header: paraStyle = self.paraHeaderStyle
|
||||
else: paraStyle = self.paraStyle
|
||||
|
@ -52,8 +52,10 @@ class OdtTable:
|
|||
self.res += '</%stable-cell>' % self.tns
|
||||
else:
|
||||
tag = header and 'th' or 'td'
|
||||
self.res += '<%s colspan="%d">%s</%s>' % \
|
||||
(tag, span, cgi.escape(str(content)), tag)
|
||||
palign = ''
|
||||
if align: palign = ' align="%s"' % align
|
||||
self.res += '<%s colspan="%d"%s>%s</%s>' % \
|
||||
(tag, span, palign, cgi.escape(str(content)), tag)
|
||||
|
||||
def startRow(self):
|
||||
if not self.html:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue