retrospring/app/services/question_markdown.rb
Andreas Nedbal 3bdca34c2d QuestionMarkdown adjustments
* Using `Redcarpet::Render::StripDown` as base now
* Support for autolinks and named links in Markdown
* Named links in questions just return the actual link as text
* Fixed codestyle in files
2022-01-16 22:33:48 +01:00

16 lines
290 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}</p>"
end
def link(link, _title, _content)
process_link(link)
end
end