lib/rouge/lexers/java.rb in rouge-4.0.0 vs lib/rouge/lexers/java.rb in rouge-4.0.1
- old
+ new
@@ -51,9 +51,10 @@
rule %r/(?:#{declarations.join('|')})\b/, Keyword::Declaration
rule %r/(?:#{types.join('|')})\b/, Keyword::Type
rule %r/(?:true|false|null)\b/, Keyword::Constant
rule %r/(?:class|interface)\b/, Keyword::Declaration, :class
rule %r/(?:import|package)\b/, Keyword::Namespace, :import
+ rule %r/"""\s*\n.*?(?<!\\)"""/m, Str::Heredoc
rule %r/"(\\\\|\\"|[^"])*"/, Str
rule %r/'(?:\\.|[^\\]|\\u[0-9a-f]{4})'/, Str::Char
rule %r/(\.)(#{id})/ do
groups Operator, Name::Attribute
end