lib/rouge/lexers/vue.rb in rouge-3.4.1 vs lib/rouge/lexers/vue.rb in rouge-3.5.0
- old
+ new
@@ -34,54 +34,54 @@
end
start { @js.reset! }
prepend :root do
- rule /(<)(\s*)(template)/ do
+ rule %r/(<)(\s*)(template)/ do
groups Name::Tag, Text, Keyword
@lang = HTML
push :template
push :lang_tag
end
- rule /(<)(\s*)(style)/ do
+ rule %r/(<)(\s*)(style)/ do
groups Name::Tag, Text, Keyword
@lang = CSS
push :style
push :lang_tag
end
- rule /(<)(\s*)(script)/ do
+ rule %r/(<)(\s*)(script)/ do
groups Name::Tag, Text, Keyword
@lang = Javascript
push :script
push :lang_tag
end
end
state :style do
- rule /(<\s*\/\s*)(style)(\s*>)/ do
+ rule %r/(<\s*\/\s*)(style)(\s*>)/ do
groups Name::Tag, Keyword, Name::Tag
pop!
end
mixin :style_content
mixin :embed
end
state :script do
- rule /(<\s*\/\s*)(script)(\s*>)/ do
+ rule %r/(<\s*\/\s*)(script)(\s*>)/ do
groups Name::Tag, Keyword, Name::Tag
pop!
end
mixin :script_content
mixin :embed
end
state :lang_tag do
- rule /(lang\s*=)(\s*)("(?:\\.|[^\\])*?"|'(\\.|[^\\])*?'|[^\s>]+)/ do |m|
+ rule %r/(lang\s*=)(\s*)("(?:\\.|[^\\])*?"|'(\\.|[^\\])*?'|[^\s>]+)/ do |m|
groups Name::Attribute, Text, Str
@lang = lookup_lang(m[3])
end
mixin :tag
@@ -91,21 +91,21 @@
rule %r((<\s*/\s*)(template)(\s*>)) do
groups Name::Tag, Keyword, Name::Tag
pop!
end
- rule /{{/ do
+ rule %r/{{/ do
token Str::Interpol
push :template_interpol
@js.reset!
end
mixin :embed
end
state :template_interpol do
- rule /}}/, Str::Interpol, :pop!
- rule /}/, Error
+ rule %r/}}/, Str::Interpol, :pop!
+ rule %r/}/, Error
mixin :template_interpol_inner
end
state :template_interpol_inner do
rule(/{/) { delegate @js; push }