Remove raw markdown options

This commit is contained in:
Karina Kwiatek 2023-02-18 20:19:31 +01:00
parent 7650bae75c
commit f5050971e9
2 changed files with 2 additions and 11 deletions

View File

@ -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

View File

@ -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"]