appy.pod: added param 'stylesMapping' for the 'text' function (which calls 'xhtml' internally); appy.gen: bufgix in the translation system (translation of group-related labels); appy.shared.dav: bugfix while getting the 'content-type' HTTP header key; appy.shared.dav: smart error handling when parsing wrong XML content.
This commit is contained in:
parent
36237c3ee5
commit
4e848ce0a8
3 changed files with 30 additions and 15 deletions
|
@ -239,11 +239,11 @@ class Renderer:
|
|||
return Xhtml2OdtConverter(xhtmlContent, encoding, self.stylesManager,
|
||||
stylesMapping, ns).run()
|
||||
|
||||
def renderText(self, text, encoding='utf-8'):
|
||||
def renderText(self, text, encoding='utf-8', stylesMapping={}):
|
||||
'''Method that can be used (under the name 'text') into a pod template
|
||||
for inserting a text containing carriage returns.'''
|
||||
text = text.replace('\r\n', '<br/>').replace('\n', '<br/>')
|
||||
return self.renderXhtml(text, encoding)
|
||||
return self.renderXhtml(text, encoding, stylesMapping)
|
||||
|
||||
def evalIfExpression(self, condition, ifTrue, ifFalse):
|
||||
'''This method implements the method 'test' which is proposed in the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue