Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A simpler markdown converter for node.js

I have a node.js app and I want to allow my users to enhance their messages with a little markdown. But only a little. I want

  • Sanitization
  • Bold (**) and Italics (*)
  • Links

And that's about it, nothing more. But I may need more later, when extending the messaging system.

I've looked at showdown, markdown-js and PageDown. Only the latter had sanitising, but all of them are not configurable. PageDown was most promising, but I couldn't get it to not produce <p>'s around the output.

Is there some other alternative that allows me more control?

like image 836
Lanbo Avatar asked Sep 23 '26 07:09

Lanbo


1 Answers

There is a rather new converter which supports direct access to the lexer. I think it will be what you need: https://github.com/chjj/marked

like image 149
qiao Avatar answered Sep 26 '26 01:09

qiao



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!