instant-markdown-d icon indicating copy to clipboard operation
instant-markdown-d copied to clipboard

Multimarkdown support?

Open chiphogg opened this issue 12 years ago • 4 comments

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?

chiphogg avatar Aug 03 '12 19:08 chiphogg

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.

suan avatar Aug 20 '12 05:08 suan

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.

chiphogg avatar Sep 02 '12 17:09 chiphogg

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! =)

suan avatar Sep 05 '12 21:09 suan

Sounds like a good way to go about it!

chiphogg avatar Sep 08 '12 01:09 chiphogg