Do not share a single Redcarpet::Markdown object across threads
There are apparently thread-safety issues: https://github.com/vmg/redcarpet/pull/672lolsob-rspec
parent
8effca3e23
commit
ce528d61b4
|
@ -137,8 +137,6 @@ class Formatter
|
||||||
private
|
private
|
||||||
|
|
||||||
def markdown_formatter
|
def markdown_formatter
|
||||||
return @markdown_formatter if defined?(@markdown_formatter)
|
|
||||||
|
|
||||||
extensions = {
|
extensions = {
|
||||||
autolink: true,
|
autolink: true,
|
||||||
no_intra_emphasis: true,
|
no_intra_emphasis: true,
|
||||||
|
@ -163,7 +161,7 @@ class Formatter
|
||||||
link_attributes: { target: '_blank', rel: 'nofollow noopener' },
|
link_attributes: { target: '_blank', rel: 'nofollow noopener' },
|
||||||
})
|
})
|
||||||
|
|
||||||
@markdown_formatter = Redcarpet::Markdown.new(renderer, extensions)
|
Redcarpet::Markdown.new(renderer, extensions)
|
||||||
end
|
end
|
||||||
|
|
||||||
def html_entities
|
def html_entities
|
||||||
|
|
Loading…
Reference in New Issue