Skip section on runtimeerror

This commit is contained in:
Kovid Goyal 2007-07-30 02:26:03 +00:00
parent a69e3991b3
commit 724c852a4c

View File

@ -1099,7 +1099,12 @@ class Markdown:
for regexp in ['ul', 'ol', 'quoted', 'tabbed'] :
m = RE.regExp[regexp].match(lines[0])
if m :
processFn[regexp](parent_elem, lines, inList)
try:
processFn[regexp](parent_elem, lines, inList)
except RuntimeError:
print 'WARNING: Max recursion depth excedeeded, skipping section'
#print '\n'.join(lines)
#sys.exit()
return
# We are NOT looking at one of the high-level structures like