package formatters

import (
	
	

	
	
	
)

var (
	// NoOp formatter.
	NoOp = Register("noop", chroma.FormatterFunc(func( io.Writer,  *chroma.Style,  chroma.Iterator) error {
		for  := ();  != chroma.EOF;  = () {
			if ,  := io.WriteString(, .Value);  != nil {
				return 
			}
		}
		return nil
	}))
	// Default HTML formatter outputs self-contained HTML.
	htmlFull = Register("html", html.New(html.Standalone(true), html.WithClasses(true))) // nolint
	SVG      = Register("svg", svg.New(svg.EmbedFont("Liberation Mono", svg.FontLiberationMono, svg.WOFF)))
)

// Fallback formatter.
var Fallback = NoOp

// Registry of Formatters.
var Registry = map[string]chroma.Formatter{}

// Names of registered formatters.
func () []string {
	 := []string{}
	for  := range Registry {
		 = append(, )
	}
	sort.Strings()
	return 
}

// Get formatter by name.
//
// If the given formatter is not found, the Fallback formatter will be returned.
func ( string) chroma.Formatter {
	if ,  := Registry[];  {
		return 
	}
	return Fallback
}

// Register a named formatter.
func ( string,  chroma.Formatter) chroma.Formatter {
	Registry[] = 
	return 
}