lib/rouge/lexers/toml.rb in rouge-3.15.0 vs lib/rouge/lexers/toml.rb in rouge-3.16.0

- old
+ new

@@ -46,19 +46,42 @@ mixin :content end state :content do mixin :basic + rule %r/"""/, Str, :mdq rule %r/"/, Str, :dq + rule %r/'''/, Str, :msq + rule %r/'/, Str, :sq mixin :esc_str rule %r/\,/, Punctuation rule %r/\[/, Punctuation, :array end state :dq do rule %r/"/, Str, :pop! + rule %r/\n/, Error, :pop! mixin :esc_str + rule %r/[^\\"\n]+/, Str + end + + state :mdq do + rule %r/"""/, Str, :pop! + mixin :esc_str rule %r/[^\\"]+/, Str + rule %r/"+/, Str + end + + state :sq do + rule %r/'/, Str, :pop! + rule %r/\n/, Error, :pop! + rule %r/[^'\n]+/, Str + end + + state :msq do + rule %r/'''/, Str, :pop! + rule %r/[^']+/, Str + rule %r/'+/, Str end state :esc_str do rule %r/\\[0t\tn\n "\\r]/, Str::Escape end