1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-11-23 22:24:39 +02:00

Add new TokeniseOption EnsureLF (#336)

* Add new TokeniseOption EnsureLF

ref #329

* Use efficient process suggested by @chmike
This commit is contained in:
satotake
2020-03-04 16:56:47 +09:00
committed by GitHub
parent e5d9650a20
commit 34d9c7143b
3 changed files with 84 additions and 1 deletions

View File

@@ -6,7 +6,8 @@ import (
var (
defaultOptions = &TokeniseOptions{
State: "root",
State: "root",
EnsureLF: true,
}
)
@@ -80,6 +81,10 @@ type TokeniseOptions struct {
State string
// Nested tokenisation.
Nested bool
// If true, all EOLs are converted into LF
// by replacing CRLF and CR
EnsureLF bool
}
// A Lexer for tokenising source code.