1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-21 19:06:18 +02:00
2017-06-07 20:13:25 +10:00

16 lines
326 B
Go

package formatters
import (
"fmt"
"io"
"github.com/alecthomas/chroma"
)
// Raw formatter outputs the raw token structures.
var Raw = Register("raw", chroma.FormatterFunc(func(w io.Writer, s *chroma.Style) (func(*chroma.Token), error) {
return func(token *chroma.Token) {
fmt.Fprintln(w, token.GoString())
}, nil
}))