Added labels for each comment

This commit is contained in:
Stefan Ritter 2009-11-02 14:14:21 +01:00
parent 2a108530e7
commit bb47b2dbd9
1 changed files with 6 additions and 0 deletions

View File

@ -452,6 +452,7 @@ else:
print ' <div class="comments">'
notfirstline = 0 # Ugly fix for closing comment containers
label_count = 0
for line in comments_content:
if re.search("^-", line):
@ -460,6 +461,11 @@ else:
print ' </div>'
notfirstline = 0;
print ' <div class="comment">'
#Label for each comment
label_count += 1
print ' <a name="' + str(label_count) + '"></a>'
print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>'
elif re.search("^\+", line):
print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>'