Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2010-01-23 09:11:18 -06:00
commit c85b50ff66
2 changed files with 5 additions and 5 deletions

View file

@ -127,4 +127,9 @@ require 'stringsupport'
end end
end end
def darken(s)
n=s.length/3
s.scan( %r(\w{#{n},#{n}}) ).collect {|a| (a.hex * 2/3).to_s(16).rjust(n,'0')}.join
end
end end

View file

@ -91,9 +91,4 @@ module WikiHelper
{:class => 'navlink', :id => 'rollback', :rel => 'nofollow'}) {:class => 'navlink', :id => 'rollback', :rel => 'nofollow'})
end end
def darken(s)
n=s.length/3
s.scan( %r(\w{#{n},#{n}}) ).collect {|a| (a.hex * 2/3).to_s(16).rjust(n,'0')}.join
end
end end