showdown
showdown copied to clipboard
Slow processing when parsing blockquotes
Showdown takes too much time to process a malformed input Steps:
- create a file containing several '>' character
$ printf '>%.0s' {1..600} > test ## this creates a file with 600 '>' characters
- 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.
I'm also getting this error. Is there any solution or parameter to limit the number of nested blockquotes that are allowed?