ticket id
000034
status
closed
priority
???
assigned to
waylan
Reported by: bavelasq
Component:

The following issue:

File "/base/data/home/apps/tapingya/2.333952260742068510/markdown/__init__.py", line 400, in convert
start = output.index('<%s>'%DOC_TAG)+len(DOC_TAG)+2
ValueError: substring not found

Was produced when formatting this text:

[Data Binding presentation]:http://link.brightcove.com/services/player/bcpid1733261879?bclid=1729365228&bctid=1741212660

I fixed it by using try, except: around the md.convert(text) call, but thought I should bring it to your attention.

Barry

Comments

Waylan on 6/5/09

Thanks for the report Barry. First of all, the simplest input that produces the error is this:

[foo]:bar

As it turns out, markdown sees this as a reference link and removes it from the document. However, the document is now empty, but markdown has already checked for an empty document - so the empty document shortcut is missed. Of course, when trying to strip the top level tags if finds an empty div: <?xml version='1.0' encoding='utf8'?><div /> instead of: <?xml version='1.0' encoding='utf8'?><div>{{ content here }}</div>. For obvious reasons, it chokes on that.

Fixed in 7bfdc83.

Resolution

fixed

Powered by Sputnik | XHTML 1.1