lib/rouge/lexers/protobuf.rb in rouge-3.13.0 vs lib/rouge/lexers/protobuf.rb in rouge-3.14.0
- old
+ new
@@ -15,10 +15,10 @@
datatype = /\b(bool|bytes|double|fixed32|fixed64|float|int32|int64|sfixed32|sfixed64|sint32|sint64|string|uint32|uint64)\b/
state :root do
rule %r/[\s]+/, Text
rule %r/[,;{}\[\]()]/, Punctuation
- rule %r/\/(\\\n)?\/(\n|(.|\n)*?[^\\]\n)/, Comment::Single
+ rule %r/\/(\\\n)?\/($|(.|\n)*?[^\\]$)/, Comment::Single
rule %r/\/(\\\n)?\*(.|\n)*?\*(\\\n)?\//, Comment::Multiline
rule kw, Keyword
rule datatype, Keyword::Type
rule %r/true|false/, Keyword::Constant
rule %r/(package)(\s+)/ do