Ruby/Redcarpet: strip markdown from text

1.9k Views Asked by At

I'm writing a Ruby app and it currently uses redcarpet to render Markdown.

I need to strip Markdown markup from a text. Any easy way to do it?

1

There are 1 best solutions below

2
On BEST ANSWER

Yes, it's possible with the Redcarpet::Render::StripDown Class -> https://rubydoc.info/gems/redcarpet/Redcarpet/Render/StripDown

It says "Turns Markdown into plaintext"