Fixes syntax highlighting broken by r1930 (#2143).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1993 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-11-08 15:18:02 +00:00
parent 077723c90a
commit 9ae6e60c26
2 changed files with 23 additions and 3 deletions
+5 -1
View File
@@ -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