diff --git a/lib/redmine/wiki_formatting/common_mark/syntax_highlight_filter.rb b/lib/redmine/wiki_formatting/common_mark/syntax_highlight_filter.rb index a027e6a17..316a7b8fd 100644 --- a/lib/redmine/wiki_formatting/common_mark/syntax_highlight_filter.rb +++ b/lib/redmine/wiki_formatting/common_mark/syntax_highlight_filter.rb @@ -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