Remove raw markdown options
This commit is contained in:
parent
7650bae75c
commit
f5050971e9
|
@ -28,8 +28,8 @@ module MarkdownHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def raw_markdown(content)
|
def raw_markdown(content)
|
||||||
renderer = Redcarpet::Render::HTML.new(MARKDOWN_RENDERER_OPTS)
|
renderer = Redcarpet::Render::HTML.new(**MARKDOWN_RENDERER_OPTS)
|
||||||
md = Redcarpet::Markdown.new(renderer, RAW_MARKDOWN_OPTS)
|
md = Redcarpet::Markdown.new(renderer, **MARKDOWN_OPTS)
|
||||||
raw md.render content
|
raw md.render content
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,15 +22,6 @@ MARKDOWN_RENDERER_OPTS = {
|
||||||
hard_wrap: true,
|
hard_wrap: true,
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
RAW_MARKDOWN_OPTS = {
|
|
||||||
tables: true,
|
|
||||||
fenced_code_blocks: true,
|
|
||||||
autolink: true,
|
|
||||||
disable_indented_code_blocks: true,
|
|
||||||
strikethrough: true,
|
|
||||||
superscript: false,
|
|
||||||
}.freeze
|
|
||||||
|
|
||||||
ALLOWED_HOSTS_IN_MARKDOWN = [
|
ALLOWED_HOSTS_IN_MARKDOWN = [
|
||||||
APP_CONFIG["hostname"],
|
APP_CONFIG["hostname"],
|
||||||
*APP_CONFIG["allowed_hosts_in_markdown"]
|
*APP_CONFIG["allowed_hosts_in_markdown"]
|
||||||
|
|
Loading…
Reference in New Issue