diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-08 15:18:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-08 15:18:02 +0000 |
commit | 9ae6e60c260e8d695034244eb890fc77c60f54f6 (patch) | |
tree | 05bdb3a1cd404444a2c5225dbc0d67a510715fdd /lib | |
parent | 077723c90a97e517b3726a0d9c66e36c0cd18d2f (diff) | |
download | redmine-9ae6e60c260e8d695034244eb890fc77c60f54f6.tar.gz redmine-9ae6e60c260e8d695034244eb890fc77c60f54f6.zip |
Fixes syntax highlighting broken by r1930 (#2143).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1993 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redcloth3.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index 638ef6d97..220617f14 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -1051,7 +1051,11 @@ class RedCloth3 < String else htmlesc( aftertag, :NoQuotes ) if aftertag line = "<redpre##{ @pre_list.length }>" - @pre_list << "#{ $3.gsub(/<(#{ OFFTAGS })[^>]*>/, '<\\1>') }#{ aftertag }" + $3.match(/<#{ OFFTAGS }([^>]*)>/) + tag = $1 + $2.to_s.match(/(class\=\S+)/i) + tag << " #{$1}" if $1 + @pre_list << "<#{ tag }>#{ aftertag }" end elsif $1 and codepre > 0 if codepre - used_offtags.length > 0 |