From 8d11662b5b6f8af73913ce6ba4e5e950881399e9 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Fri, 16 Oct 2009 16:49:24 +0200 Subject: Made two regexp more beautiful --- blogthon.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'blogthon.cgi') 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 ' ' print ' ' notfirstline = 0; print '
' print '
' + line.split(".", 1)[1].strip() + '
' - elif line.split(".", 1)[0] == "+": + elif re.search("^\+", line): print '
' + line.split(".", 1)[1].strip() + '
' print '
' else: -- cgit v1.2.3