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?
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?
Yes, it's possible with the Redcarpet::Render::StripDown
Class -> https://rubydoc.info/gems/redcarpet/Redcarpet/Render/StripDown
It says "Turns Markdown into plaintext"
Uninitialized constant: Redcarpet::Render::StripDown
error, but adding require 'redcarpet/render_strip'
fixed it; see github.com/vmg/redcarpet/issues/138 –
Shotton © 2022 - 2024 — McMap. All rights reserved.