instant-markdown-d
instant-markdown-d copied to clipboard
Multimarkdown support?
My situation
Multimarkdown (MMD) is a popular superset of markdown. It has the killer (for me) feature of LaTeX-style equations -- a must, since I plan to switch to markdown for scientific communication.
Unfortunately, your plugin has spoiled me! I can't write MMD without missing the in-browser preview. :)
What to do?
Obviously, you can't simply add MMD support. Your GFM support is a killer feature, and GFM is incompatible with MMD.
So I guess I'm asking: is there a way for end-users to customize the markdown parser, so we can switch between GFM, MMD, or anything else we have installed?
What would you recommend?
Alright, so here's what I think: I can add a MultiMarkdown option which you will use by specifying a flag when you start the server, something like instant-markdown-d --multimarkdown
. Then, on the vim plugin side, I could add commands such as :UseMultimarkdown
and :UseGFM
which would shut down the server then start it up again with the appropriate flags. What do you think?
I would only get around to this when I do the full-Ruby rewrite though, so I would have to use a Ruby wrapper like this. Would appreciate, if you have time, if you could you quickly test that out and see if it works.
Sounds like a good plan. I feel bad, though -- I'm moving more in a pandoc direction!
Taking a step back and looking at the bigger picture: there are a variety of markdown supersets around, none clearly superior to the others. Thus, there's great value in letting the user choose any superset, as long as they can supply a parser. I'm not familiar with implementation details -- is that materially more difficult than adding support for a single new parser?
I'm happy to help testing. I'm currently writing a scientific paper in pandoc syntax, so to test your plugin, I would simply use it while I write the paper.
Yeah that has definitely crossed my mind. Right now I'm working on the Ruby rewrite and I'll try to abstract out the parser so that the user can provide an arbitrary command to run. (To start with I think I'll just read the command from an ~/.instant-markdown-drc
file) Hopefully it'll work and still be performant! =)
Sounds like a good way to go about it!