mirror of
https://github.com/alecthomas/chroma.git
synced 2025-07-07 00:46:37 +02:00
Add golangci-lint and fix all lint issues.
This commit is contained in:
@ -44,8 +44,9 @@ func Literator(tokens ...Token) Iterator {
|
||||
}
|
||||
}
|
||||
|
||||
// SplitTokensIntoLines splits tokens containing newlines in two.
|
||||
func SplitTokensIntoLines(tokens []Token) (out [][]Token) {
|
||||
var line []Token
|
||||
var line []Token // nolint: prealloc
|
||||
for _, token := range tokens {
|
||||
for strings.Contains(token.Value, "\n") {
|
||||
parts := strings.SplitAfterN(token.Value, "\n", 2)
|
||||
|
Reference in New Issue
Block a user