Smileyt / python-markdown2

Automatically exported from code.google.com/p/python-markdown2
Other
0 stars 0 forks source link

couple of extra letters break link parsing #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. from markdown2 import markdown as m

2. >>> m('[However installation of Kunnafonix was resisted by many of the local 
organizations they 
had to work with The local "computer person" resented a solution that was so 
easy to use that it 
undermined the power and prestige they received by being the person to consult 
when a Windows 
computer had problems](http://tuxdeluxe.org/node/287)')
u'<p>[However installation of Kunnafonix was resisted by many of the local 
organizations they had to 
work with The local "computer person" resented a solution that was so easy to 
use that it undermined 
the power and prestige they received by being the person to consult when a 
Windows computer had 
problems](http://tuxdeluxe.org/node/287)</p>\n'

3. >>> m('[wever installation of Kunnafonix was resisted by many of the local 
organizations they had to 
work with The local "computer person" resented a solution that was so easy to 
use that it undermined 
the power and prestige they received by being the person to consult when a 
Windows computer had 
problems](http://tuxdeluxe.org/node/287)')
u'<p><a href="http://tuxdeluxe.org/node/287">wever installation of Kunnafonix 
was resisted by 
many of the local organizations they had to work with The local "computer 
person" resented a solution 
that was so easy to use that it undermined the power and prestige they received 
by being the person to 
consult when a Windows computer had problems</a></p>\n'

What is the expected output? What do you see instead?

See, just removing few letters at the start of a string make it being parsed 
properly. Same result may be 
achieved by removing words in the middle of a sentence. I cannot see any sense 
in what triggers this 
bug :(

What version of the product are you using? On what operating system?
>>> markdown2.__version__
'1.0.1.11'

Please provide any additional information below.

Original issue reported on code.google.com by atregoub...@gmail.com on 11 Dec 2008 at 11:37

GoogleCodeExporter commented 8 years ago
Thanks for the bug report. Sorry it has been so long to respond.

Test case added in r191.

Original comment by tre...@gmail.com on 4 Jun 2009 at 6:06

GoogleCodeExporter commented 8 years ago
Fixed in r195. There is a sentinel for the code that parses out long link text.
Before this change it was 300 chars. Your example hit that. Now the sentinel is 
3000
chars. Could potentially have a perf impact, but my *guess* is that there 
should be a
significant one.

target release: 1.0.1.13

Original comment by tre...@gmail.com on 2 Jul 2009 at 4:46