Browse Source

Do not share a single Redcarpet::Markdown object across threads

There are apparently thread-safety issues: https://github.com/vmg/redcarpet/pull/672
closed-social-glitch-2
Thibaut Girka 5 years ago
committed by ThibG
parent
commit
d6a7d62dc6
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      app/lib/formatter.rb

+ 1
- 3
app/lib/formatter.rb View File

@ -137,8 +137,6 @@ class Formatter
private
def markdown_formatter
return @markdown_formatter if defined?(@markdown_formatter)
extensions = {
autolink: true,
no_intra_emphasis: true,
@ -163,7 +161,7 @@ class Formatter
link_attributes: { target: '_blank', rel: 'nofollow noopener' },
})
@markdown_formatter = Redcarpet::Markdown.new(renderer, extensions)
Redcarpet::Markdown.new(renderer, extensions)
end
def html_entities

Loading…
Cancel
Save