diff options
| author | a73x <[email protected]> | 2024-08-31 19:08:31 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-08-31 19:08:31 +0100 |
| commit | da7e34735f3811da300ed56c504a171e3e407de9 (patch) | |
| tree | 92050fddce9b7bfb8c36c6bf39d095c3e1acc9ff /contrib/styles.go | |
| parent | 68cc8a115d79c97e3c557c70d81d59d0de29ae46 (diff) | |
chore(html): removed js for go chroma
Diffstat (limited to 'contrib/styles.go')
| -rw-r--r-- | contrib/styles.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/styles.go b/contrib/styles.go new file mode 100644 index 0000000..2b02b95 --- /dev/null +++ b/contrib/styles.go @@ -0,0 +1,20 @@ +// style.go: generate chroma css +// go run contrib/style.go > syntax.css +package main + +import ( + "os" + + "github.com/alecthomas/chroma/formatters/html" + "github.com/alecthomas/chroma/styles" +) + +func main() { + style := styles.Get("xcode") // Choose your preferred style + if style == nil { + style = styles.Fallback + } + + formatter := html.New(html.WithClasses(true), html.TabWidth(2)) + formatter.WriteCSS(os.Stdout, style) +} |
