1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Enable EnsureNL for TradingView and C# lexers

This commit is contained in:
Jos512 2019-01-23 08:44:26 +01:00 committed by Alec Thomas
parent abbe00cecd
commit 8ce6ac6016
6 changed files with 11 additions and 2 deletions

View File

@ -13,6 +13,7 @@ var CSharp = internal.Register(MustNewLexer(
Filenames: []string{"*.cs"},
MimeTypes: []string{"text/x-csharp"},
DotAll: true,
EnsureNL: true,
},
Rules{
"root": {

View File

@ -13,6 +13,7 @@ var TradingView = internal.Register(MustNewLexer(
Filenames: []string{"*.tv"},
MimeTypes: []string{"text/x-tradingview"},
DotAll: true,
EnsureNL: true,
},
Rules{
"root": {

View File

@ -9,3 +9,5 @@ foreach (DriveInfo drive in drives)
Console.WriteLine(dir);
}
}
// Comment as last line should be recognised properly

View File

@ -69,5 +69,6 @@
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n"}
{"type":"Text","value":"\n\n"},
{"type":"CommentSingle","value":"// Comment as last line should be recognised properly\n"}
]

View File

@ -10,3 +10,5 @@ plot(series=emaVal, style=circles, offset=2, linewidth=3)
bgcolor(color=close > open ? orange :
close != high[1] ? purple :
na, transp=80)
// Comment as last line should be recognised properly

View File

@ -89,5 +89,7 @@
{"type":"Text","value":", transp"},
{"type":"KeywordPseudo","value":"="},
{"type":"LiteralNumber","value":"80"},
{"type":"Text","value":")\n"}
{"type":"Text","value":")\n\n"},
{"type":"CommentSingle","value":"// Comment as last line should be recognised properly"},
{"type":"Text","value":"\n"}
]