Fixed tests when IRichText behavior is used.

This commit is contained in:
Markus Hilbert
2018-07-11 12:35:46 +02:00
committed by Jens W. Klein
parent 0a16de8526
commit 3c36af8ebc
24 changed files with 490 additions and 399 deletions
+3 -1
View File
@@ -76,7 +76,9 @@ def creator(object):
@indexer(IComment)
def description(object):
# Return the first 25 words of the comment text and append ' [...]'
text = ' '.join(object.getText(targetMimetype='text/plain').split()[:MAX_DESCRIPTION])
text = ' '.join(
object.getText(targetMimetype='text/plain').split()[:MAX_DESCRIPTION],
)
if len(object.getText().split()) > 25:
text += ' [...]'
return text