lib/rouge/lexers/nginx.rb in rouge-1.1.0 vs lib/rouge/lexers/nginx.rb in rouge-1.2.0
- old
+ new
@@ -8,11 +8,11 @@
id = /[^\s$;{}()#]+/
state :root do
rule /(include)(\s+)([^\s;]+)/ do
- group Keyword; group Text; group Name
+ groups Keyword, Text, Name
end
rule id, Keyword, :statement
mixin :base
@@ -41,19 +41,18 @@
rule /(?:on|off)\b/, Name::Constant
rule /[$][\w-]+/, Name::Variable
# host/port
rule /([a-z0-9.-]+)(:)([0-9]+)/i do
- group Name::Function; group Punctuation
- group Num::Integer
+ groups Name::Function, Punctuation, Num::Integer
end
# mimetype
rule %r([a-z-]+/[a-z-]+)i, Name::Class
rule /[0-9]+[kmg]?\b/i, Num::Integer
rule /(~)(\s*)([^\s{]+)/ do
- group Punctuation; group Text; group Str::Regex
+ groups Punctuation, Text, Str::Regex
end
rule /[:=~]/, Punctuation
# pathname