markdown-js icon indicating copy to clipboard operation
markdown-js copied to clipboard

md2html could accept an encoding parameter

Open 1kastner opened this issue 9 years ago • 7 comments

My idea would be, that when you pass a parameter for the encoding, this is put into the html file. Kind of:

md2html myFile.md --encoding=utf8 > myFile.html

And then utf8-Encoding would be automatically part, like <meta charset="utf-8"/>

1kastner avatar Jul 11 '15 10:07 1kastner

Sounds like a nice idea (your example got cut off but I think I know what you were going to say - probably you need to escape it so github doesn't sanitize it)

I'll happily merge a pull request that does this cleanly.

ashb avatar Jul 11 '15 11:07 ashb

yes, I forgot about that, now you should see it. I will try to find a nice solution.

1kastner avatar Jul 11 '15 12:07 1kastner

It seems to work nicely for me and I have written some tests.

1kastner avatar Jul 11 '15 17:07 1kastner

I have provided a pull request. I hope you are happy with what I am doing with the options-parameter.

1kastner avatar Jul 13 '15 13:07 1kastner

#246 got declined...

1kastner avatar Oct 04 '17 22:10 1kastner

I also need this. Tried using md2html on a text I had written, and the non-ascii letters came out as complete gibberish.

tobixen avatar Jun 19 '20 14:06 tobixen

Have you tried on of the alternatives listed at https://github.com/evilstreak/markdown-js#notice-unmaintained ?

1kastner avatar Jun 22 '20 10:06 1kastner