Search code examples
rubymarkdownredcarpet

Ruby/Redcarpet: strip markdown from text


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?


Solution

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

    It says "Turns Markdown into plaintext"