1
0
Fork 0
forked from github/pelican

use string find() instead of index(). Fixes #880.

We're expecting a non-match to return -1, which is what find() does,
but index() instead throws a ValueError.
This commit is contained in:
Joe Shaw 2013-05-08 09:40:20 -04:00
commit 5fa3504ad0

View file

@ -37,7 +37,7 @@ def decode_wp_content(content, br=True):
pre_index = 0
for pre_part in pre_parts:
start = pre_part.index("<pre")
start = pre_part.find("<pre")
if start == -1:
content = content + pre_part
continue