Skip to content
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

converter.makeHtml is slow for multiple dashes terminated with extra characters #315

Closed
rolandliwag opened this issue Dec 19, 2016 · 3 comments
Assignees
Labels

Comments

@rolandliwag
Copy link

rolandliwag commented Dec 19, 2016

const converter = new require('showdown').Converter();
return converter.makeHtml('- - - - - - - - - - - - - - - - - - - - - - - - - - - - A');

The extra characters in this case are an nbsp (char code 160) and the uppercase A. Adding more dashes to the left makes it take more and more time.

#312 partially fixed this since the output is now correct but it is still slow.

@tivie tivie added the bug label Dec 19, 2016
@tivie tivie self-assigned this Dec 19, 2016
@tivie
Copy link
Member

tivie commented Dec 19, 2016

I've narrowed the problem (and found the culprit) but I'm really not sure how to fix it. In fact, I don't even know why it is so slow.

I've opened a question in codereview, asking for help. Maybe the collective knowledge can find an answer or, at least, shed some light on this strange behavior.

@tivie tivie closed this as completed in da8fb53 Dec 19, 2016
@tivie
Copy link
Member

tivie commented Dec 19, 2016

Should be fixed now.

@rolandliwag
Copy link
Author

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants