Hangs on Large Files w/ Fenced Code Blocks
Hi fletcher,
I have a properly formatted markdown document with 2497 lines. This is a technical document for an API with many, many code examples in fenced code blocks.
If I copy any single section into a file and attempt to render it, multimarkdown runs properly. However, with all of the lines together, marked hangs with 100% cpu.
It seems that there's an exponential increase in rendering time for each additional line added, and it seems to be because of MultiMarkdown.
While writing the document, sections would slow the renderer down as they got larger.
I chose marked only because of Table support and Fenced Code Blocks.
If I turn off Fenced Code Blocks, everything works as expected. I suspect it has something to do with syntax highlighting.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 26 Jun, 2012 07:30 PM
It's not MMD's fault, it's Marked's. The next version has this fixed, and I'd be happy to include you in a beta if you like.
-Brett
2 Posted by Dallas J Slieke... on 28 Jun, 2012 04:29 AM
That sounds great! Thanks Brett. For now, we are splitting our files into smaller blocks and using them to assemble multi-page html documentation with cross-linking.
Works for now, but we're very interested in your beta!
3 Posted by Pierre on 05 Jul, 2012 12:01 PM
I have the same problem. Any idea of when the next version will be released? Interested in the beta too!
Support Staff 4 Posted by Brett on 06 Jul, 2012 01:27 PM
The next round of the beta should be out this week. I still have to finish sandboxing and there are new features which complicate that (VoodooPad and MarsEdit integration). I'll keep you posted. In the meantime if you do have a production-level issue with code block handling, I'm willing to add a few more people to the beta so you have a working solution. Contact me at http://brettterpstra.com/contact/ if needed.
5 Posted by dergachev on 30 Oct, 2012 12:00 AM
Hey I've got the same problem. Turning on fenced blocks makes Marked hang for 15 seconds or so each time I save the file, quite unbearable.
File in question: https://github.com/dergachev/vagrant_redmine/blob/master/README.md
I paid for the app just to get github rendering previews, so fenced blocks are a must. And because of this bug, my $5 is currently wasted. :(
I can live without sytnax highlighting in Marked, but not github; perhaps there's a workaround until 1.5 ships?
Support Staff 6 Posted by Brett on 30 Oct, 2012 12:05 AM
You can set up a custom processor using any interpreter you want. If you have a markdown processor that can handle fenced code blocks, just add it as the custom processor. I believe Kramdown and Maruku will handle it, but there may be other differences from Github's (technically) proprietary syntax.