mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-29 19:59:38 +00:00
Makes RedCloth3#retrieve MUCH faster (#18883).
git-svn-id: http://svn.redmine.org/redmine/trunk@13919 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b7b1f64079
commit
dd79e8e31f
@ -986,8 +986,8 @@ class RedCloth3 < String
|
||||
end
|
||||
|
||||
def retrieve( text )
|
||||
@shelf.each_with_index do |r, i|
|
||||
text.gsub!( " :redsh##{ i + 1 }:", r )
|
||||
text.gsub!(/ :redsh#(\d+):/) do
|
||||
@shelf[$1.to_i - 1] || $&
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user