1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-19 19:00:13 +02:00

Rename formatter "tokens" -> "raw".

This commit is contained in:
Alec Thomas 2017-06-07 20:13:25 +10:00
parent 7a7b85b4b3
commit a0db747409
2 changed files with 15 additions and 15 deletions

15
formatters/raw.go Normal file
View File

@ -0,0 +1,15 @@
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
}))

View File

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