yoavram / markx

Markdown editor for scientific writing. Batteries included.
Other
319 stars 41 forks source link

github favoured markdown? #42

Open fyears opened 11 years ago

fyears commented 11 years ago

Is it possible to support gfm?

So I can write codes without (stupid) indent, and I can generate a <br/> more conveniently.

yoavram commented 11 years ago

Hi It is possible, but this is not a feature which I am going to implement any time soon. The aim of Markx was to support enough of pandoc-flavored markdown in the real preview so that it would be comfortable to write and convert to other formats as needed. However, it is possible in principle and it is probably very easy to implement, you would just need to write a new preConversionHook to convert GFM-type code blocks to standard code block. If you would like to do and would like more information then I will be happy to provide this information, as well as accept pull-requests.

Yoav

fyears commented 11 years ago

@yoavram

Oh, in fact, all I want is Fenced code blocks, and hard line breaks.

Fenced code blocks should be supported by Pandoc by default, but not implemented in Markx. It should be considered a bug.

Hard line breaks is also supported by pandoc as an extension. I think one or two lines should be add in server.py, but I am not pretty sure. Hope anyone can help.

yoavram commented 11 years ago

These things should be addressed in markx.js as a pre or post conversion hook - see for example how processGooglePrettifierPreBlocks is used.

By the link you provided, fenced code blocks are an extension and not a default of Pandoc. Markx uses PageDown for markdown conversion, anything not supported there needs to be added in the way I mentioned above and which is documented on PageDown wiki.

I'll re-open this issue so that it will be on the future to do list.