lib/rouge/lexers/vue.rb in rouge-3.1.0 vs lib/rouge/lexers/vue.rb in rouge-3.1.1

- old
+ new

@@ -14,17 +14,19 @@ super @js = Javascript.new(options) end def lookup_lang(lang) + lang.downcase! + lang = lang.gsub(/["']*/, '') case lang when 'html' then HTML when 'css' then CSS when 'javascript' then Javascript when 'sass' then Sass when 'scss' then Scss - when 'coffee' then CoffeeScript + when 'coffee' then Coffeescript # TODO: add more when the lexers are done else PlainText end end @@ -75,10 +77,10 @@ end state :lang_tag do rule /(lang\s*=)(\s*)("(?:\\.|[^\\])*?"|'(\\.|[^\\])*?'|[^\s>]+)/ do |m| groups Name::Attribute, Text, Str - @lang = lookup_lang(m[2]) + @lang = lookup_lang(m[3]) end mixin :tag end