diff options
author | W. Trevor King <wking@drexel.edu> | 2010-02-22 09:39:21 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-02-22 09:39:21 -0500 |
commit | 8c6466e1c0ece79dab0d358097503c6d637ea203 (patch) | |
tree | ad133796f2fcf18a17c02ac9f3fe074d48d4388c | |
parent | 9e0399cd22521478a24cb08fc384ee946f14ef59 (diff) | |
download | bugseverywhere-8c6466e1c0ece79dab0d358097503c6d637ea203.tar.gz |
Use truncated_id in `be html` comment <div id="">
-rw-r--r-- | libbe/command/html.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libbe/command/html.py b/libbe/command/html.py index 1148236..d26faf8 100644 --- a/libbe/command/html.py +++ b/libbe/command/html.py @@ -243,14 +243,15 @@ class HTMLGen (object): comment_entries.append('</div>\n') assert len(stack) == depth stack.append(comment) + template_info = { + 'shortname': comment.id.user(), + 'truncated_id': self._truncated_comment_id(comment)} if depth == 0: comment_entries.append('<div class="comment root">') else: comment_entries.append( - '<div class="comment" id="%s">' % comment.uuid) - template_info = { - 'shortname': comment.id.user(), - 'truncated_id': self._truncated_comment_id(comment)} + '<div class="comment" id="%s">' + % template_info['truncated_id']) for attr in ['uuid', 'author', 'date', 'body']: value = getattr(comment, attr) if attr == 'body': |