#7960 Add support for Markdown footnote syntax in Mobile view
Splitting stripdown and markdownify options, because the footnote option seems to let the Redcarpet::Render::StripDown function crash
This commit is contained in:
parent
122e12a068
commit
c71caa5cb8
1 changed files with 26 additions and 17 deletions
|
|
@ -50,7 +50,7 @@ module Diaspora
|
|||
end
|
||||
|
||||
def strip_markdown
|
||||
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, options[:markdown_options]
|
||||
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, options[:stripdown_options]
|
||||
@message = renderer.render(message).strip
|
||||
end
|
||||
|
||||
|
|
@ -105,26 +105,35 @@ module Diaspora
|
|||
end
|
||||
end
|
||||
|
||||
DEFAULTS = {mentioned_people: [],
|
||||
link_all_mentions: false,
|
||||
disable_hovercards: false,
|
||||
truncate: false,
|
||||
append: nil,
|
||||
append_after_truncate: nil,
|
||||
squish: false,
|
||||
escape: true,
|
||||
escape_tags: false,
|
||||
markdown_options: {
|
||||
autolink: true,
|
||||
DEFAULTS = {mentioned_people: [],
|
||||
link_all_mentions: false,
|
||||
disable_hovercards: false,
|
||||
truncate: false,
|
||||
append: nil,
|
||||
append_after_truncate: nil,
|
||||
squish: false,
|
||||
escape: true,
|
||||
escape_tags: false,
|
||||
stripdown_options: {
|
||||
autolink: true,
|
||||
fenced_code_blocks: true,
|
||||
space_after_headers: true,
|
||||
strikethrough: true,
|
||||
tables: true,
|
||||
no_intra_emphasis: true,
|
||||
strikethrough: true,
|
||||
tables: true,
|
||||
no_intra_emphasis: true
|
||||
},
|
||||
markdown_options: {
|
||||
autolink: true,
|
||||
fenced_code_blocks: true,
|
||||
space_after_headers: true,
|
||||
strikethrough: true,
|
||||
footnotes: true,
|
||||
tables: true,
|
||||
no_intra_emphasis: true
|
||||
},
|
||||
markdown_render_options: {
|
||||
filter_html: true,
|
||||
hard_wrap: true,
|
||||
filter_html: true,
|
||||
hard_wrap: true,
|
||||
safe_links_only: true
|
||||
}}.freeze
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue