[minor] Truncate comment in Feed to 240 chars

This commit is contained in:
Anand Doshi 2014-08-11 12:27:47 +05:30
parent 52d1ea83a0
commit e4aaa3d18f

View File

@ -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')