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

Document and add iterator panic recovery.

This commit is contained in:
Alec Thomas
2017-09-20 22:30:25 +10:00
parent cc0e4a59ab
commit e2d6abaa64
10 changed files with 75 additions and 27 deletions

View File

@@ -55,7 +55,7 @@ func handleCodeblock(groups []string, lexer Lexer) Iterator {
if err != nil {
panic(err)
}
iterators = append(iterators, sub)
iterators = append(iterators, Literator(tokens...), sub)
}
iterators = append(iterators, Literator(&Token{String, groups[5]}))
return Concaterator(iterators...)