Using shared markdown options for plain text

fixes #7960
closes #8277
This commit is contained in:
Thorsten Claus 2021-08-22 18:22:58 +02:00 committed by Benjamin Neff
parent c71caa5cb8
commit 8f9ac33649
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 4 additions and 9 deletions

View file

@ -14,6 +14,7 @@
* Add tags to tumblr posts [#8244](https://github.com/diaspora/diaspora/pull/8244)
* Add blocks to the archive export [#8263](https://github.com/diaspora/diaspora/pull/8263)
* Allow points and dashes in the username [#8266](https://github.com/diaspora/diaspora/pull/8266)
* Add support for footnotes in markdown [#8277](https://github.com/diaspora/diaspora/pull/8277)
# 0.7.15.0

View file

@ -50,7 +50,9 @@ module Diaspora
end
def strip_markdown
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, options[:stripdown_options]
# Footnotes are not supported in text-only outputs (mail, crossposts etc)
stripdown_options = options[:markdown_options].except(:footnotes)
renderer = Redcarpet::Markdown.new Redcarpet::Render::StripDown, stripdown_options
@message = renderer.render(message).strip
end
@ -114,14 +116,6 @@ module Diaspora
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
},
markdown_options: {
autolink: true,
fenced_code_blocks: true,