mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
3bdca34c2d
* 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
16 lines
290 B
Ruby
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
|