Retrospring/app/services/question_markdown.rb

15 lines
301 B
Ruby

# frozen_string_literal: true
require "uri"
class QuestionMarkdown < Redcarpet::Render::StripDown
include Rails.application.routes.url_helpers
include SharedMarkers
def paragraph(text) = "<p>#{text.gsub("\n", '<br>')}</p>"
def link(link, _title, _content)
process_link(link)
end
end