From 690cad6cfb81900db57501666b99d16b6741190e Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Wed, 4 Sep 2019 09:24:29 +0900 Subject: [PATCH] Conform lexer rules to specification --- lib/rouge/lexers/csvs.rb | 38 ++++++++++++++-------------- spec/visual/samples/csvs | 54 ++++++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/lib/rouge/lexers/csvs.rb b/lib/rouge/lexers/csvs.rb index 2c7af788f8..e4294453ea 100644 --- a/lib/rouge/lexers/csvs.rb +++ b/lib/rouge/lexers/csvs.rb @@ -11,33 +11,33 @@ class CSVS < RegexLexer state :root do rule %r/\s+/m, Text - rule %r(//.*), Comment::Single - rule %r(#.*), Comment::Single - rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline - rule %r(/[+]), Comment::Multiline, :nested_comment - rule %r/"[^"]*"/, Str::Double - rule %r/'[^\r\n\f']'/, Str::Char - - rule %r(:?:=), Keyword - rule %r/[()]/, Punctuation + rule %r(//[\S\t ]*), Comment::Single + rule %r(/\*[^*]*\*/)m, Comment::Multiline - rule %r([-=;,*+>