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

showdown freezes for specific input #276

Closed
libHive opened this issue Jul 20, 2016 · 5 comments
Closed

showdown freezes for specific input #276

libHive opened this issue Jul 20, 2016 · 5 comments
Assignees
Labels

Comments

@libHive
Copy link

libHive commented Jul 20, 2016

Hey

I got this when trying to parse this markdown -

<!-- This extra line is necessary for table to render properly. -->
|                                                                          |      DNSChain      | X.509 PKI with [Certificate Transparency][ct] |
|--------------------------------------------------------------------------|--------------------|-----------------------------------------------|
| __MITM-proof'ed [Internet connections][mitm]__                           | :white_check_mark: | :x:                                           |
| __Secure and simple [GPG key distribution][gpg]__                        | :white_check_mark: | :x:                                           |
| __MITM-proof RESTful [API to blockchain][api]__                          | :white_check_mark: | :x:                                           |
| __Free and [actually-secure][free] SSL certificates__                    | :white_check_mark: | :x:                                           |
| __Stops many [denial-of-service attacks][dos]__                          | :white_check_mark: | :x:                                           |
| __Certificate revocation [that actually works][rev]__                    | :white_check_mark: | :x:                                           |
| __DNS-based [censorship circumvention][cens]__                           | :white_check_mark: | :x:                                           |
| __Prevents [domain theft][theft] ("seizures")__                          | :white_check_mark: | :x:                                           |
| __Access blockchain [domains like `.bit`, `.p2p`, `.nxt`, `.eth`][use]__ | :white_check_mark: | :x:                                           |
| __Certificate transparency (publicly auditable log of certs)__           | :white_check_mark: | :white_check_mark: ([maybe][ct])              |

(it's taken from https://github.com/okTurtles/dnschain/blob/master/README.md)

I'm not sure of there are any markdown errors here but showdown totally freezes and locks up the thread. Using this in nodejs means my process is effectively stuck and in the showdown demo page (browser) the thread/tab is also frozen.

@tivie
Copy link
Member

tivie commented Jul 20, 2016

It has something to do with the comment, since the table works properly, when parsed alone.

It only happens when there is no new line between the comment and the table.

@tivie tivie added the bug label Jul 20, 2016
@tivie tivie self-assigned this Jul 20, 2016
@tivie
Copy link
Member

tivie commented Jul 20, 2016

I will look into it as soon as possible

@tivie tivie closed this as completed in 238726c Jul 20, 2016
@tivie
Copy link
Member

tivie commented Jul 20, 2016

Ok, after further inspection, it seems the problem lied with a regex lookahead that was taking too long to complete. The regex was modified and simplified and the issue seems fixed now.

@tivie
Copy link
Member

tivie commented Jul 20, 2016

Issue is fixed, check this link

@avnersorek
Copy link

Thanks !

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

3 participants