This commit is contained in:
Kovid Goyal 2023-03-23 16:22:24 +05:30
parent 7b16132b75
commit 18445e20ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -80,10 +80,9 @@ func clear_background(style *chroma.Style) *chroma.Style {
return style return style
} }
const SGR_PREFIX = "\033["
const SGR_SUFFIX = "m"
func ansi_formatter(w io.Writer, style *chroma.Style, it chroma.Iterator) error { func ansi_formatter(w io.Writer, style *chroma.Style, it chroma.Iterator) error {
const SGR_PREFIX = "\033["
const SGR_SUFFIX = "m"
style = clear_background(style) style = clear_background(style)
before, after := make([]byte, 0, 64), make([]byte, 0, 64) before, after := make([]byte, 0, 64), make([]byte, 0, 64)
nl := []byte{'\n'} nl := []byte{'\n'}