Made two regexp more beautiful

This commit is contained in:
Stefan Ritter 2009-10-16 16:49:24 +02:00
parent 8a9962265a
commit 8d11662b5b
1 changed files with 2 additions and 2 deletions

View File

@ -454,14 +454,14 @@ else:
notfirstline = 0 # Ugly fix for closing comment containers notfirstline = 0 # Ugly fix for closing comment containers
for line in comments_content: for line in comments_content:
if line.split(".", 1)[0] == "-": if re.search("^-", line):
if notfirstline == 1: if notfirstline == 1:
print ' </div>' print ' </div>'
print ' </div>' print ' </div>'
notfirstline = 0; notfirstline = 0;
print ' <div class="comment">' print ' <div class="comment">'
print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>' print ' <div class="comment_author">' + line.split(".", 1)[1].strip() + '</div>'
elif line.split(".", 1)[0] == "+": elif re.search("^\+", line):
print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>' print ' <div class="comment_date">' + line.split(".", 1)[1].strip() + '</div>'
print ' <div class="comment_content">' print ' <div class="comment_content">'
else: else: