FIX: allow global settings to include keys that have numbers in them

This commit is contained in:
Sam
2015-08-14 17:01:06 +10:00
parent 71fb065133
commit e82f892c2d
2 changed files with 6 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class GlobalSetting
def read
ERB.new(File.read(@file)).result().split("\n").each do |line|
if line =~ /^\s*([a-z_]+)\s*=\s*(\"([^\"]*)\"|\'([^\']*)\'|[^#]*)/
if line =~ /^\s*([a-z_]+[a-z0-9_]*)\s*=\s*(\"([^\"]*)\"|\'([^\']*)\'|[^#]*)/
@data[$1.strip.to_sym] = ($4 || $3 || $2).strip
end
end