[MERGE] forward port of branch 7.0 up to c62a75a
This commit is contained in:
commit
b3f3dafcb9
|
@ -774,15 +774,10 @@ class _rml_flowable(object):
|
||||||
style = self.styles.para_style_get(node)
|
style = self.styles.para_style_get(node)
|
||||||
if extra_style:
|
if extra_style:
|
||||||
style.__dict__.update(extra_style)
|
style.__dict__.update(extra_style)
|
||||||
result = []
|
text_node = self._textual(node).strip().replace('\n\n', '\n').replace('\n', '<br/>')
|
||||||
tag_text = ''
|
instance = platypus.Paragraph(text_node, style, **(utils.attr_get(node, [], {'bulletText':'str'})))
|
||||||
plain_text = ''
|
result = [instance]
|
||||||
for i in self._textual(node).split('\n'):
|
if LooseVersion(reportlab.Version) > LooseVersion('3.0') and not instance.getPlainText().strip() and instance.text.strip():
|
||||||
instance = platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'})))
|
|
||||||
plain_text += instance.getPlainText().strip()
|
|
||||||
tag_text += instance.text.strip()
|
|
||||||
result.append(instance)
|
|
||||||
if LooseVersion(reportlab.Version) > LooseVersion('3.0') and not plain_text and tag_text:
|
|
||||||
result.append(platypus.Paragraph(' <br/>', style, **(utils.attr_get(node, [], {'bulletText': 'str'}))))
|
result.append(platypus.Paragraph(' <br/>', style, **(utils.attr_get(node, [], {'bulletText': 'str'}))))
|
||||||
return result
|
return result
|
||||||
elif node.tag=='barCode':
|
elif node.tag=='barCode':
|
||||||
|
|
Loading…
Reference in New Issue