lib/rouge/lexers/jsp.rb in rouge-3.5.1 vs lib/rouge/lexers/jsp.rb in rouge-3.6.0

- old
+ new

@@ -5,20 +5,20 @@ module Lexers class JSP < TemplateLexer desc 'JSP' tag 'jsp' filenames '*.jsp' - mimetypes 'text/x-jsp', 'application/x-jsp' + mimetypes 'text/x-jsp', 'application/x-jsp' def initialize(*) super @java = Java.new end directives = %w(page include taglib) actions = %w(scriptlet declaration expression) - + state :root do rule %r/<%--/, Comment, :jsp_comment rule %r/<%@\s*(#{directives.join('|')})\s*/, Name::Tag, :jsp_directive @@ -104,10 +104,10 @@ rule %r/[^']+/, Str end state :jsp_interp do rule %r/\}/, Str::Interpol, :pop! - rule %r/'/, Literal, :jsp_interp_literal_start + rule %r/'/, Literal, :jsp_interp_literal_start rule(/[^'\}]+/) { delegate @java } end state :jsp_interp_literal_start do rule %r/'/, Literal, :pop! \ No newline at end of file