#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
|
end
|
||||||
|
|
||||||
def strip_markdown
|
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
|
@message = renderer.render(message).strip
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -114,13 +114,22 @@ module Diaspora
|
||||||
squish: false,
|
squish: false,
|
||||||
escape: true,
|
escape: true,
|
||||||
escape_tags: false,
|
escape_tags: false,
|
||||||
markdown_options: {
|
stripdown_options: {
|
||||||
autolink: true,
|
autolink: true,
|
||||||
fenced_code_blocks: true,
|
fenced_code_blocks: true,
|
||||||
space_after_headers: true,
|
space_after_headers: true,
|
||||||
strikethrough: true,
|
strikethrough: true,
|
||||||
tables: 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: {
|
markdown_render_options: {
|
||||||
filter_html: true,
|
filter_html: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue