1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-19 21:10:15 +02:00

Add EnsureNL to C/Java lexers.

Fixes #396.
This commit is contained in:
Alec Thomas 2021-02-06 11:56:46 +11:00
parent 305a0397ac
commit 2a1e1a1bf4
2 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ var C = internal.Register(MustNewLexer(
Aliases: []string{"c"},
Filenames: []string{"*.c", "*.h", "*.idc"},
MimeTypes: []string{"text/x-chdr", "text/x-csrc"},
EnsureNL: true,
},
Rules{
"whitespace": {

View File

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