lib/rouge/lexers/plist.rb in rouge-3.4.1 vs lib/rouge/lexers/plist.rb in rouge-3.5.0
- old
+ new
@@ -4,44 +4,44 @@
module Lexers
class Plist < RegexLexer
desc 'plist'
tag 'plist'
aliases 'plist'
- filenames *%w(*.plist *.pbxproj)
+ filenames '*.plist', '*.pbxproj'
mimetypes 'text/x-plist', 'application/x-plist'
state :whitespace do
- rule /\s+/, Text::Whitespace
+ rule %r/\s+/, Text::Whitespace
end
state :root do
rule %r{//.*$}, Comment
rule %r{/\*.+?\*/}m, Comment
mixin :whitespace
- rule /{/, Punctuation, :dictionary
- rule /\(/, Punctuation, :array
- rule /"([^"\\]|\\.)*"/, Literal::String::Double
- rule /'([^'\\]|\\.)*'/, Literal::String::Single
- rule /</, Punctuation, :data
- rule %r{[\w_$/:.-]+}, Literal
+ rule %r/{/, Punctuation, :dictionary
+ rule %r/\(/, Punctuation, :array
+ rule %r/"([^"\\]|\\.)*"/, Literal::String::Double
+ rule %r/'([^'\\]|\\.)*'/, Literal::String::Single
+ rule %r/</, Punctuation, :data
+ rule %r{[\w$/:.-]+}, Literal
end
state :dictionary do
mixin :root
- rule /[=;]/, Punctuation
- rule /}/, Punctuation, :pop!
+ rule %r/[=;]/, Punctuation
+ rule %r/}/, Punctuation, :pop!
end
state :array do
mixin :root
- rule /[,]/, Punctuation
- rule /\)/, Punctuation, :pop!
+ rule %r/[,]/, Punctuation
+ rule %r/\)/, Punctuation, :pop!
end
state :data do
- rule /[\h\s]+/, Literal::Number::Hex
- rule />/, Punctuation, :pop!
+ rule %r/[\h\s]+/, Literal::Number::Hex
+ rule %r/>/, Punctuation, :pop!
end
end
end
end