aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-12-06 14:57:47 +0100
committerStefan Ritter <xeno@thehappy.de>2009-12-06 14:57:47 +0100
commite89bbb6bc325876690ea36471b71b98b6c222ff8 (patch)
tree0451ca0d7a2d385a58c328efd865be85afd3d19a /blogthon.cgi
parent3fcbc1f054a12ba21435cfe39d29e031de9250ae (diff)
Some regexp foo
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 855302a..4fb7c52 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -427,7 +427,8 @@ else:
print ' <div class="entry_date">' + date + '</div>'
print ' <div class="entry_content">'
for line in content:
- if re.search('<li>', line) or re.search('<ul>', line) or re.search('</ul>', line) or re.search('<ol>', line) or re.search('</ol>', line):
+ no_break = re.compile('^.*(<ul>|</ul>|<li>|<ol>|</ol>|<table>|</table>|<tr>|</tr>|<td>|</td>).*$')
+ if re.match(no_break, line):
print ' ' + line.strip()
else:
print ' ' + line.strip() + '<br />'