Made two regexp more beautiful

This commit is contained in:
Stefan Ritter 2009-10-16 16:49:24 +02:00
parent 8a9962265a
commit 8d11662b5b

View File

@ -454,14 +454,14 @@ else:
notfirstline = 0 # Ugly fix for closing comment containers
for line in comments_content:
if line.split(".", 1)[0] == "-":
if re.search("^-", line):
if notfirstline == 1:
print ' </div>'
print ' </div>'
notfirstline = 0;
print ' <div class="comment">'
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_content">'
else: