We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 142842c commit 5891418Copy full SHA for 5891418
markdown/core.py
@@ -276,14 +276,14 @@ def convert(self, source):
276
'<%s>' % self.doc_tag) + len(self.doc_tag) + 2
277
end = output.rindex('</%s>' % self.doc_tag)
278
output = output[start:end].strip()
279
- except ValueError: # pragma: no cover
+ except ValueError as e: # pragma: no cover
280
if output.strip().endswith('<%s />' % self.doc_tag):
281
# We have an empty document
282
output = ''
283
else:
284
# We have a serious problem
285
raise ValueError('Markdown failed to strip top-level '
286
- 'tags. Document=%r' % output.strip())
+ 'tags. Document=%r' % output.strip()) from e
287
288
# Run the text post-processors
289
for pp in self.postprocessors:
0 commit comments