Some regexp foo
This commit is contained in:
parent
3fcbc1f054
commit
e89bbb6bc3
@ -427,7 +427,8 @@ else:
|
|||||||
print ' <div class="entry_date">' + date + '</div>'
|
print ' <div class="entry_date">' + date + '</div>'
|
||||||
print ' <div class="entry_content">'
|
print ' <div class="entry_content">'
|
||||||
for line in 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()
|
print ' ' + line.strip()
|
||||||
else:
|
else:
|
||||||
print ' ' + line.strip() + '<br />'
|
print ' ' + line.strip() + '<br />'
|
||||||
|
Loading…
Reference in New Issue
Block a user