aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-10-16 16:49:24 +0200
committerStefan Ritter <xeno@thehappy.de>2009-10-16 16:49:24 +0200
commit8d11662b5b6f8af73913ce6ba4e5e950881399e9 (patch)
treecc68c8148800f83e0ea5ba1d323b867c5bb98da9
parent8a9962265ad42d0efcc529027af9e8082b062e2c (diff)
Made two regexp more beautiful
-rwxr-xr-xblogthon.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index c3a9c10..66d794e 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -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: