2015-01-12 13:00:00 +01:00
|
|
|
require 'redcarpet/render_strip'
|
|
|
|
|
|
|
|
MARKDOWN_OPTS = {
|
|
|
|
filter_html: true,
|
|
|
|
escape_html: true,
|
|
|
|
no_images: true,
|
|
|
|
no_styles: true,
|
|
|
|
safe_links_only: true,
|
|
|
|
xhtml: false,
|
|
|
|
hard_wrap: true,
|
|
|
|
no_intra_emphasis: true,
|
|
|
|
tables: true,
|
|
|
|
fenced_code_blocks: true,
|
|
|
|
autolink: true,
|
|
|
|
disable_indented_code_blocks: true,
|
|
|
|
strikethrough: true,
|
|
|
|
superscript: false
|
2015-05-26 01:26:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RAW_MARKDOWN_OPTS = {
|
|
|
|
tables: true,
|
|
|
|
fenced_code_blocks: true,
|
|
|
|
autolink: true,
|
|
|
|
disable_indented_code_blocks: true,
|
|
|
|
strikethrough: true,
|
|
|
|
superscript: false
|
|
|
|
}
|
2021-12-30 18:13:52 +01:00
|
|
|
|
2021-12-31 22:22:06 +01:00
|
|
|
ALLOWED_HOSTS_IN_MARKDOWN = [
|
2021-12-30 18:13:52 +01:00
|
|
|
APP_CONFIG['hostname'],
|
2021-12-31 22:22:06 +01:00
|
|
|
*APP_CONFIG['allowed_hosts_in_markdown']
|
2021-12-30 18:13:52 +01:00
|
|
|
]
|