Hello there, and thanks for this awesome piece of code!
I’m building a little application using the GFM mode. I saw that GFM can highlight code in fenced code blocks (well, actually it seems the markdown mode is doing the job, but anyway), and it works great if the mode was already loaded.
But I wonder if I can load these modes on-the-fly, as the users could write any kind of code in these fenced blocks, and I don’t really want to load them all when they are not used. I tried to trace the calls to Markdown.getMode and see if I could use the loadmode module, but I’m not a skilled JS programmer and didn’t really understand how that module work and if I could integrate it in getMode. Maybe I’d better rely on requirejs only, but not sure if it can operate in a synchronous way.
Do you have any idea? Maybe someone has already tackled that problem, but I couldn’t find anything on internet.
Well, thanks for any help you could give me.