New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely slow when bold AND italics inside links #34

Closed
OverZealous opened this Issue Sep 23, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@OverZealous
Copy link

OverZealous commented Sep 23, 2011

Pegdown is usually really fast, but something goes wrong when there's a bunch of links with bold _and_ italics inside the label.

For example, this basically never completes on my machine. Yes, it's odd, but I'm trying to write something to convert backward from HTML to Markdown with Pegdown extras (mostly for fun), and I was using a Wikipedia page. This is just a snippet:

 1. ^ [***a***][link143][***b***][link144][***c***][link145][***d***][link146][***e***][link147][***f***][link148][***g***][link149][***h***][link150][***i***][link151][***j***][link152][***k***][link153][***l***][link154][***m***][link155][***n***][link156][***o***][link157][***p***][link158][***q***][link159] Scheina, "Argentina," 401.

[link143]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-0
[link144]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-1
[link145]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-2
[link146]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-3
[link147]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-4
[link148]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-5
[link149]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-6
[link150]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-7
[link151]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-8
[link152]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-9
[link153]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-10
[link154]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-11
[link155]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-12
[link156]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-13
[link157]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-14
[link158]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-15
[link159]: http://en.wikipedia.org/wiki/ARA_Moreno#cite_ref-Conways_0-16

Now, if you replace all the *** with **, *, or nothing, it runs just fine. None of the other parsers I've been playing with seem to have this issue. (TextMate, Mac OS X quicklook, and a program called Readown.)

Reducing the number of links helps, too, but it still runs rather slow.

@sirthias

This comment has been minimized.

Copy link
Owner

sirthias commented Sep 23, 2011

Looks like a pathological input problem...
I'll have a look at this.
Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment