#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:
Thorsten Claus 2021-07-31 23:34:25 +02:00 committed by Benjamin Neff
parent 122e12a068
commit c71caa5cb8
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -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
@ -114,13 +114,22 @@ module Diaspora
squish: false,
escape: true,
escape_tags: false,
markdown_options: {
stripdown_options: {
autolink: true,
fenced_code_blocks: true,
space_after_headers: true,
strikethrough: true,
tables: true,
no_intra_emphasis: 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,