Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/lib/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ def link_url(url)
private

def markdown_formatter
return @markdown_formatter if defined?(@markdown_formatter)

extensions = {
autolink: true,
no_intra_emphasis: true,
Expand All @@ -163,7 +161,7 @@ def markdown_formatter
link_attributes: { target: '_blank', rel: 'nofollow noopener' },
})

@markdown_formatter = Redcarpet::Markdown.new(renderer, extensions)
Redcarpet::Markdown.new(renderer, extensions)
end

def html_entities
Expand Down