From e89bbb6bc325876690ea36471b71b98b6c222ff8 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Sun, 6 Dec 2009 14:57:47 +0100 Subject: Some regexp foo --- blogthon.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blogthon.cgi b/blogthon.cgi index 855302a..4fb7c52 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -427,7 +427,8 @@ else: print '
' + date + '
' print '
' for line in content: - if re.search('
  • ', line) or re.search('
      ', line) or re.search('
    ', line) or re.search('
      ', line) or re.search('
    ', line): + no_break = re.compile('^.*(
      |
    |
  • |
      |
    ||
    ||||).*$') + if re.match(no_break, line): print ' ' + line.strip() else: print ' ' + line.strip() + '
    ' -- cgit v1.2.3