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

Fix bug with empty states.

This commit is contained in:
Alec Thomas 2017-09-22 22:39:32 +10:00
parent 0bb853fb4f
commit 2ce2ec7f65

View File

@ -110,6 +110,7 @@ func NewLexer(config *Config, rules Rules) (*RegexLexer, error) {
}
compiledRules := map[string][]*CompiledRule{}
for state, rules := range rules {
compiledRules[state] = nil
for _, rule := range rules {
flags := ""
if !config.NotMultiline {