evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

md2html could accept an encoding parameter #245

Open 1kastner opened 8 years ago

1kastner commented 8 years ago

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"/>

ashb commented 8 years ago

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.

1kastner commented 8 years ago

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

1kastner commented 8 years ago

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

1kastner commented 8 years ago

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

1kastner commented 6 years ago

246 got declined...

tobixen commented 4 years ago

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

1kastner commented 4 years ago

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