mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Preserve the code block and remove the class from it when the language is not supported in CommonMark formatter (#35765, 32424).
git-svn-id: http://svn.redmine.org/redmine/trunk@21181 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1f0f9d49c1
commit
12b2dd3098
@ -38,8 +38,8 @@ module Redmine
|
||||
node.inner_html = html
|
||||
node["class"] = "#{lang} syntaxhl"
|
||||
else
|
||||
# unsupported language, strip out the code tag
|
||||
node.parent.inner_html = text
|
||||
# unsupported language, remove the class attribute
|
||||
node.remove_attribute("class")
|
||||
end
|
||||
end
|
||||
doc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user