showdown icon indicating copy to clipboard operation
showdown copied to clipboard

Slow processing when parsing blockquotes

Open rafonsecad opened this issue 5 years ago • 1 comments

Showdown takes too much time to process a malformed input Steps:

  1. create a file containing several '>' character $ printf '>%.0s' {1..600} > test ## this creates a file with 600 '>' characters
  2. run showdown to parse the file
$ time ./showdown.js makehtml -i test -o test.html
Enabling option ghCodeBlocks
Enabling option encodeEmails
...
Reading data from file...
Parsing markdown...
Writing data to file...


DONE!
./showdown.js makehtml -i test -o test.html  84,86s user 0,27s system 99% cpu 1:25,25 total

It took a total of 84 seconds to process. When the number of characters increase, the time to process increase much faster.

rafonsecad avatar Jun 29 '19 17:06 rafonsecad

I'm also getting this error. Is there any solution or parameter to limit the number of nested blockquotes that are allowed?

dannyhyatt avatar May 05 '20 03:05 dannyhyatt