[minor] Truncate comment in Feed to 240 chars
This commit is contained in:
parent
52d1ea83a0
commit
e4aaa3d18f
@ -93,6 +93,10 @@ def update_feed(doc, method=None):
|
||||
|
||||
def make_comment_feed(doc, method):
|
||||
"""add comment to feed"""
|
||||
make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
|
||||
'<i>"' + doc.comment + '"</i>', '#6B24B3')
|
||||
comment = doc.comment
|
||||
if len(comment) > 240:
|
||||
comment = comment[:240] + "..."
|
||||
|
||||
make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
|
||||
'<i>"' + comment + '"</i>', '#6B24B3')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user