diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-05 23:11:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-05 23:11:35 +0000 |
commit | 582dcf4b365e5889a216fcc41dc647046ba9e188 (patch) | |
tree | 3fd466f09abaa44da6e459b6daa5a3b2b7ca1428 /lib | |
parent | 45c93340b78da811d151f16177eeaa59064988f4 (diff) | |
download | redmine-582dcf4b365e5889a216fcc41dc647046ba9e188.tar.gz redmine-582dcf4b365e5889a216fcc41dc647046ba9e188.zip |
Fixed that macros with uppercase letters can not be called (#12744).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11126 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/macros.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index 64b7814b9..5bafd269b 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -147,10 +147,10 @@ module Redmine unless block_given? raise "Can not create a macro without a block!" end - name = name.to_sym if name.is_a?(String) + name = name.to_s.downcase.to_sym available_macros[name] = {:desc => @@desc || ''}.merge(options) @@desc = nil - Definitions.send :define_method, "macro_#{name}".downcase, &block + Definitions.send :define_method, "macro_#{name}", &block end # Sets description for the next macro to be defined |