In 12 markdown markdown force_unicode Out 12 In 13 markdown markdown f

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
In [12]: markdown.markdown(force_unicode(''))
Out[12]: u''
In [13]: markdown.markdown(force_unicode(' '))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/kron/domains/crafts-mono/<ipython console> in <module>()
/usr/lib/python2.5/site-packages/markdown/__init__.py in markdown(text, extensions, safe_mode, output_format)
585 safe_mode=safe_mode,
586 output_format=output_format)
--> 587 return md.convert(text)
588
589
/usr/lib/python2.5/site-packages/markdown/__init__.py in convert(self, source)
398 output, length = codecs.utf_8_decode(self.serializer(root, encoding="utf8"))
399 if self.stripTopLevelTags:
--> 400 start = output.index('<%s>'%DOC_TAG)+len(DOC_TAG)+2
401 end = output.rindex('</%s>'%DOC_TAG)
402 output = output[start:end].strip()
ValueError: substring not found