Fixed tests when IRichText behavior is used.
This commit is contained in:
committed by
Jens W. Klein
parent
0a16de8526
commit
3c36af8ebc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user