mirror of
https://github.com/alecthomas/chroma.git
synced 2025-12-15 23:41:30 +02:00
Return errors for invalid styles, rather than panicking.
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// {{upper_name}} style.
|
// {{upper_name}} style.
|
||||||
var {{upper_name}} = Register(chroma.NewStyle("{{name}}", chroma.StyleEntries{
|
var {{upper_name}} = Register(chroma.MustNewStyle("{{name}}", chroma.StyleEntries{
|
||||||
{{#styles}}
|
{{#styles}}
|
||||||
chroma.{{type}}: "{{style}}",
|
chroma.{{type}}: "{{style}}",
|
||||||
{{/styles}}
|
{{/styles}}
|
||||||
|
|||||||
@@ -99,10 +99,12 @@ command, for Go.
|
|||||||
// Retrieve user-specified style, clone it, and add some overrides.
|
// Retrieve user-specified style, clone it, and add some overrides.
|
||||||
style := styles.Get(*styleFlag).Clone()
|
style := styles.Get(*styleFlag).Clone()
|
||||||
if *htmlHighlightStyleFlag != "" {
|
if *htmlHighlightStyleFlag != "" {
|
||||||
style.Add(chroma.LineHighlight, *htmlHighlightStyleFlag)
|
err := style.Add(chroma.LineHighlight, *htmlHighlightStyleFlag)
|
||||||
|
kingpin.FatalIfError(err, "invalid line highlight style")
|
||||||
}
|
}
|
||||||
if *htmlLinesStyleFlag != "" {
|
if *htmlLinesStyleFlag != "" {
|
||||||
style.Add(chroma.LineNumbers, *htmlLinesStyleFlag)
|
err := style.Add(chroma.LineNumbers, *htmlLinesStyleFlag)
|
||||||
|
kingpin.FatalIfError(err, "invalid line style")
|
||||||
}
|
}
|
||||||
|
|
||||||
if *formatterFlag == "html" {
|
if *formatterFlag == "html" {
|
||||||
|
|||||||
15
colour.go
15
colour.go
@@ -50,16 +50,27 @@ var ANSI2RGB = map[string]string{
|
|||||||
type Colour int32
|
type Colour int32
|
||||||
|
|
||||||
// ParseColour in the forms #rgb, #rrggbb, #ansi<colour>, or #<colour>.
|
// ParseColour in the forms #rgb, #rrggbb, #ansi<colour>, or #<colour>.
|
||||||
// Will panic if colour is in an invalid format.
|
// Will return an "unset" colour if invalid.
|
||||||
func ParseColour(colour string) Colour {
|
func ParseColour(colour string) Colour {
|
||||||
colour = normaliseColour(colour)
|
colour = normaliseColour(colour)
|
||||||
n, err := strconv.ParseUint(colour, 16, 32)
|
n, err := strconv.ParseUint(colour, 16, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
return 0
|
||||||
}
|
}
|
||||||
return Colour(n + 1)
|
return Colour(n + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MustParseColour is like ParseColour except it panics if the colour is invalid.
|
||||||
|
//
|
||||||
|
// Will panic if colour is in an invalid format.
|
||||||
|
func MustParseColour(colour string) Colour {
|
||||||
|
parsed := ParseColour(colour)
|
||||||
|
if !parsed.IsSet() {
|
||||||
|
panic(fmt.Errorf("invalid colour %q", colour))
|
||||||
|
}
|
||||||
|
return parsed
|
||||||
|
}
|
||||||
|
|
||||||
func (c Colour) IsSet() bool { return c != 0 }
|
func (c Colour) IsSet() bool { return c != 0 }
|
||||||
|
|
||||||
func (c Colour) String() string { return fmt.Sprintf("#%06x", int(c-1)) }
|
func (c Colour) String() string { return fmt.Sprintf("#%06x", int(c-1)) }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type ttyTable struct {
|
|||||||
distance map[chroma.Colour]colorful.Color
|
distance map[chroma.Colour]colorful.Color
|
||||||
}
|
}
|
||||||
|
|
||||||
var c = chroma.ParseColour
|
var c = chroma.MustParseColour
|
||||||
|
|
||||||
var ttyTables = map[int]*ttyTable{
|
var ttyTables = map[int]*ttyTable{
|
||||||
8: &ttyTable{
|
8: &ttyTable{
|
||||||
|
|||||||
55
style.go
55
style.go
@@ -1,6 +1,7 @@
|
|||||||
package chroma
|
package chroma
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -78,14 +79,27 @@ func (s *StyleEntry) Sub(e *StyleEntry) *StyleEntry {
|
|||||||
type StyleEntries map[TokenType]string
|
type StyleEntries map[TokenType]string
|
||||||
|
|
||||||
// NewStyle creates a new style definition.
|
// NewStyle creates a new style definition.
|
||||||
func NewStyle(name string, entries StyleEntries) *Style {
|
func NewStyle(name string, entries StyleEntries) (*Style, error) {
|
||||||
s := &Style{
|
s := &Style{
|
||||||
Name: name,
|
Name: name,
|
||||||
Entries: map[TokenType]*StyleEntry{},
|
Entries: map[TokenType]*StyleEntry{},
|
||||||
}
|
}
|
||||||
s.Add(Background, "")
|
if err := s.Add(Background, ""); err != nil {
|
||||||
s.AddAll(entries)
|
return nil, err
|
||||||
return s
|
}
|
||||||
|
if err := s.AddAll(entries); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return s, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MustNewStyle creates a new style or panics.
|
||||||
|
func MustNewStyle(name string, entries StyleEntries) *Style {
|
||||||
|
style, err := NewStyle(name, entries)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return style
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Style definition.
|
// A Style definition.
|
||||||
@@ -124,7 +138,7 @@ func (s *Style) Get(ttype TokenType) *StyleEntry {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Style) AddAll(entries StyleEntries) *Style {
|
func (s *Style) AddAll(entries StyleEntries) error {
|
||||||
tis := []int{}
|
tis := []int{}
|
||||||
for tt := range entries {
|
for tt := range entries {
|
||||||
tis = append(tis, int(tt))
|
tis = append(tis, int(tt))
|
||||||
@@ -133,15 +147,17 @@ func (s *Style) AddAll(entries StyleEntries) *Style {
|
|||||||
for _, ti := range tis {
|
for _, ti := range tis {
|
||||||
tt := TokenType(ti)
|
tt := TokenType(ti)
|
||||||
entry := entries[tt]
|
entry := entries[tt]
|
||||||
s.Add(tt, entry)
|
if err := s.Add(tt, entry); err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
return s
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a StyleEntry to the Style map.
|
// Add a StyleEntry to the Style map.
|
||||||
//
|
//
|
||||||
// See http://pygments.org/docs/styles/#style-rules for details.
|
// See http://pygments.org/docs/styles/#style-rules for details.
|
||||||
func (s *Style) Add(ttype TokenType, entry string) *Style { // nolint: gocyclo
|
func (s *Style) Add(ttype TokenType, entry string) error { // nolint: gocyclo
|
||||||
dupl := s.Entries[ttype.SubCategory()]
|
dupl := s.Entries[ttype.SubCategory()]
|
||||||
if dupl == nil {
|
if dupl == nil {
|
||||||
dupl = s.Entries[ttype.Category()]
|
dupl = s.Entries[ttype.Category()]
|
||||||
@@ -155,12 +171,16 @@ func (s *Style) Add(ttype TokenType, entry string) *Style { // nolint: gocyclo
|
|||||||
parent := &StyleEntry{}
|
parent := &StyleEntry{}
|
||||||
// Duplicate ancestor node.
|
// Duplicate ancestor node.
|
||||||
*parent = *dupl
|
*parent = *dupl
|
||||||
s.Entries[ttype] = ParseStyleEntry(parent, entry)
|
se, err := ParseStyleEntry(parent, entry)
|
||||||
return s
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
s.Entries[ttype] = se
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseStyleEntry parses a Pygments style entry.
|
// ParseStyleEntry parses a Pygments style entry.
|
||||||
func ParseStyleEntry(parent *StyleEntry, entry string) *StyleEntry { // nolint: gocyclo
|
func ParseStyleEntry(parent *StyleEntry, entry string) (*StyleEntry, error) { // nolint: gocyclo
|
||||||
out := &StyleEntry{}
|
out := &StyleEntry{}
|
||||||
parts := strings.Fields(entry)
|
parts := strings.Fields(entry)
|
||||||
// Check if parent style should be inherited...
|
// Check if parent style should be inherited...
|
||||||
@@ -194,13 +214,22 @@ func ParseStyleEntry(parent *StyleEntry, entry string) *StyleEntry { // nolint:
|
|||||||
out.Background = 0
|
out.Background = 0
|
||||||
case strings.HasPrefix(part, "bg:#"):
|
case strings.HasPrefix(part, "bg:#"):
|
||||||
out.Background = ParseColour(part[3:])
|
out.Background = ParseColour(part[3:])
|
||||||
|
if !out.Background.IsSet() {
|
||||||
|
return nil, fmt.Errorf("invalid background colour %q", part)
|
||||||
|
}
|
||||||
case strings.HasPrefix(part, "border:#"):
|
case strings.HasPrefix(part, "border:#"):
|
||||||
out.Border = ParseColour(part[7:])
|
out.Border = ParseColour(part[7:])
|
||||||
|
if !out.Border.IsSet() {
|
||||||
|
return nil, fmt.Errorf("invalid border colour %q", part)
|
||||||
|
}
|
||||||
case strings.HasPrefix(part, "#"):
|
case strings.HasPrefix(part, "#"):
|
||||||
out.Colour = ParseColour(part)
|
out.Colour = ParseColour(part)
|
||||||
|
if !out.Colour.IsSet() {
|
||||||
|
return nil, fmt.Errorf("invalid colour %q", part)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
// Here lies an error, but we ignore it in the interests of convenience.
|
return nil, fmt.Errorf("unknown style element %q", part)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Abap style.
|
// Abap style.
|
||||||
var Abap = Register(chroma.NewStyle("abap", chroma.StyleEntries{
|
var Abap = Register(chroma.MustNewStyle("abap", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic #888",
|
chroma.Comment: "italic #888",
|
||||||
chroma.CommentSpecial: "#888",
|
chroma.CommentSpecial: "#888",
|
||||||
chroma.Keyword: "#00f",
|
chroma.Keyword: "#00f",
|
||||||
@@ -17,4 +16,3 @@ var Abap = Register(chroma.NewStyle("abap", chroma.StyleEntries{
|
|||||||
chroma.Error: "#F00",
|
chroma.Error: "#F00",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Algol style.
|
// Algol style.
|
||||||
var Algol = Register(chroma.NewStyle("algol", chroma.StyleEntries{
|
var Algol = Register(chroma.MustNewStyle("algol", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic #888",
|
chroma.Comment: "italic #888",
|
||||||
chroma.CommentPreproc: "bold noitalic #888",
|
chroma.CommentPreproc: "bold noitalic #888",
|
||||||
chroma.CommentSpecial: "bold noitalic #888",
|
chroma.CommentSpecial: "bold noitalic #888",
|
||||||
@@ -24,4 +23,3 @@ var Algol = Register(chroma.NewStyle("algol", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Algol_Nu style.
|
// Algol_Nu style.
|
||||||
var Algol_Nu = Register(chroma.NewStyle("algol_nu", chroma.StyleEntries{
|
var Algol_Nu = Register(chroma.MustNewStyle("algol_nu", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic #888",
|
chroma.Comment: "italic #888",
|
||||||
chroma.CommentPreproc: "bold noitalic #888",
|
chroma.CommentPreproc: "bold noitalic #888",
|
||||||
chroma.CommentSpecial: "bold noitalic #888",
|
chroma.CommentSpecial: "bold noitalic #888",
|
||||||
@@ -24,4 +23,3 @@ var Algol_Nu = Register(chroma.NewStyle("algol_nu", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Arduino style.
|
// Arduino style.
|
||||||
var Arduino = Register(chroma.NewStyle("arduino", chroma.StyleEntries{
|
var Arduino = Register(chroma.MustNewStyle("arduino", chroma.StyleEntries{
|
||||||
chroma.Error: "#a61717",
|
chroma.Error: "#a61717",
|
||||||
chroma.Comment: "#95a5a6",
|
chroma.Comment: "#95a5a6",
|
||||||
chroma.CommentPreproc: "#728E00",
|
chroma.CommentPreproc: "#728E00",
|
||||||
@@ -24,4 +23,3 @@ var Arduino = Register(chroma.NewStyle("arduino", chroma.StyleEntries{
|
|||||||
chroma.LiteralString: "#7F8C8D",
|
chroma.LiteralString: "#7F8C8D",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Autumn style.
|
// Autumn style.
|
||||||
var Autumn = Register(chroma.NewStyle("autumn", chroma.StyleEntries{
|
var Autumn = Register(chroma.MustNewStyle("autumn", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #aaaaaa",
|
chroma.Comment: "italic #aaaaaa",
|
||||||
chroma.CommentPreproc: "noitalic #4c8317",
|
chroma.CommentPreproc: "noitalic #4c8317",
|
||||||
@@ -41,4 +40,3 @@ var Autumn = Register(chroma.NewStyle("autumn", chroma.StyleEntries{
|
|||||||
chroma.Error: "#F00 bg:#FAA",
|
chroma.Error: "#F00 bg:#FAA",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Borland style.
|
// Borland style.
|
||||||
var Borland = Register(chroma.NewStyle("borland", chroma.StyleEntries{
|
var Borland = Register(chroma.MustNewStyle("borland", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #008800",
|
chroma.Comment: "italic #008800",
|
||||||
chroma.CommentPreproc: "noitalic #008080",
|
chroma.CommentPreproc: "noitalic #008080",
|
||||||
@@ -31,4 +30,3 @@ var Borland = Register(chroma.NewStyle("borland", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#e3d2d2 #a61717",
|
chroma.Error: "bg:#e3d2d2 #a61717",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// BlackWhite style.
|
// BlackWhite style.
|
||||||
var BlackWhite = Register(chroma.NewStyle("bw", chroma.StyleEntries{
|
var BlackWhite = Register(chroma.MustNewStyle("bw", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic",
|
chroma.Comment: "italic",
|
||||||
chroma.CommentPreproc: "noitalic",
|
chroma.CommentPreproc: "noitalic",
|
||||||
chroma.Keyword: "bold",
|
chroma.Keyword: "bold",
|
||||||
@@ -29,4 +28,3 @@ var BlackWhite = Register(chroma.NewStyle("bw", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Colorful style.
|
// Colorful style.
|
||||||
var Colorful = Register(chroma.NewStyle("colorful", chroma.StyleEntries{
|
var Colorful = Register(chroma.MustNewStyle("colorful", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "#888",
|
chroma.Comment: "#888",
|
||||||
chroma.CommentPreproc: "#579",
|
chroma.CommentPreproc: "#579",
|
||||||
@@ -57,4 +56,3 @@ var Colorful = Register(chroma.NewStyle("colorful", chroma.StyleEntries{
|
|||||||
chroma.Error: "#F00 bg:#FAA",
|
chroma.Error: "#F00 bg:#FAA",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Emacs style.
|
// Emacs style.
|
||||||
var Emacs = Register(chroma.NewStyle("emacs", chroma.StyleEntries{
|
var Emacs = Register(chroma.MustNewStyle("emacs", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #008800",
|
chroma.Comment: "italic #008800",
|
||||||
chroma.CommentPreproc: "noitalic",
|
chroma.CommentPreproc: "noitalic",
|
||||||
@@ -49,4 +48,3 @@ var Emacs = Register(chroma.NewStyle("emacs", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#f8f8f8",
|
chroma.Background: " bg:#f8f8f8",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Friendly style.
|
// Friendly style.
|
||||||
var Friendly = Register(chroma.NewStyle("friendly", chroma.StyleEntries{
|
var Friendly = Register(chroma.MustNewStyle("friendly", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #60a0b0",
|
chroma.Comment: "italic #60a0b0",
|
||||||
chroma.CommentPreproc: "noitalic #007020",
|
chroma.CommentPreproc: "noitalic #007020",
|
||||||
@@ -49,4 +48,3 @@ var Friendly = Register(chroma.NewStyle("friendly", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#f0f0f0",
|
chroma.Background: " bg:#f0f0f0",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Fruity style.
|
// Fruity style.
|
||||||
var Fruity = Register(chroma.NewStyle("fruity", chroma.StyleEntries{
|
var Fruity = Register(chroma.MustNewStyle("fruity", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#888888",
|
chroma.TextWhitespace: "#888888",
|
||||||
chroma.Background: "#ffffff bg:#111111",
|
chroma.Background: "#ffffff bg:#111111",
|
||||||
chroma.GenericOutput: "#444444 bg:#222222",
|
chroma.GenericOutput: "#444444 bg:#222222",
|
||||||
@@ -25,4 +24,3 @@ var Fruity = Register(chroma.NewStyle("fruity", chroma.StyleEntries{
|
|||||||
chroma.NameConstant: "#0086d2",
|
chroma.NameConstant: "#0086d2",
|
||||||
chroma.CommentPreproc: "#ff0007 bold",
|
chroma.CommentPreproc: "#ff0007 bold",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Igor style.
|
// Igor style.
|
||||||
var Igor = Register(chroma.NewStyle("igor", chroma.StyleEntries{
|
var Igor = Register(chroma.MustNewStyle("igor", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic #FF0000",
|
chroma.Comment: "italic #FF0000",
|
||||||
chroma.Keyword: "#0000FF",
|
chroma.Keyword: "#0000FF",
|
||||||
chroma.NameFunction: "#C34E00",
|
chroma.NameFunction: "#C34E00",
|
||||||
@@ -15,4 +14,3 @@ var Igor = Register(chroma.NewStyle("igor", chroma.StyleEntries{
|
|||||||
chroma.LiteralString: "#009C00",
|
chroma.LiteralString: "#009C00",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Lovelace style.
|
// Lovelace style.
|
||||||
var Lovelace = Register(chroma.NewStyle("lovelace", chroma.StyleEntries{
|
var Lovelace = Register(chroma.MustNewStyle("lovelace", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#a89028",
|
chroma.TextWhitespace: "#a89028",
|
||||||
chroma.Comment: "italic #888888",
|
chroma.Comment: "italic #888888",
|
||||||
chroma.CommentHashbang: "#287088",
|
chroma.CommentHashbang: "#287088",
|
||||||
@@ -58,4 +57,3 @@ var Lovelace = Register(chroma.NewStyle("lovelace", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#a848a8",
|
chroma.Error: "bg:#a848a8",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Manni style.
|
// Manni style.
|
||||||
var Manni = Register(chroma.NewStyle("manni", chroma.StyleEntries{
|
var Manni = Register(chroma.MustNewStyle("manni", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #0099FF",
|
chroma.Comment: "italic #0099FF",
|
||||||
chroma.CommentPreproc: "noitalic #009999",
|
chroma.CommentPreproc: "noitalic #009999",
|
||||||
@@ -49,4 +48,3 @@ var Manni = Register(chroma.NewStyle("manni", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#FFAAAA #AA0000",
|
chroma.Error: "bg:#FFAAAA #AA0000",
|
||||||
chroma.Background: " bg:#f0f3f3",
|
chroma.Background: " bg:#f0f3f3",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Monokai style.
|
// Monokai style.
|
||||||
var Monokai = Register(chroma.NewStyle("monokai", chroma.StyleEntries{
|
var Monokai = Register(chroma.MustNewStyle("monokai", chroma.StyleEntries{
|
||||||
chroma.Text: "#f8f8f2",
|
chroma.Text: "#f8f8f2",
|
||||||
chroma.Error: "#960050 bg:#1e0010",
|
chroma.Error: "#960050 bg:#1e0010",
|
||||||
chroma.Comment: "#75715e",
|
chroma.Comment: "#75715e",
|
||||||
@@ -35,4 +34,3 @@ var Monokai = Register(chroma.NewStyle("monokai", chroma.StyleEntries{
|
|||||||
chroma.GenericSubheading: "#75715e",
|
chroma.GenericSubheading: "#75715e",
|
||||||
chroma.Background: " bg:#272822",
|
chroma.Background: " bg:#272822",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// MonokaiLight style.
|
// MonokaiLight style.
|
||||||
var MonokaiLight = Register(chroma.NewStyle("monokailight", chroma.StyleEntries{
|
var MonokaiLight = Register(chroma.MustNewStyle("monokailight", chroma.StyleEntries{
|
||||||
chroma.Text: "#272822",
|
chroma.Text: "#272822",
|
||||||
chroma.Error: "#960050 bg:#1e0010",
|
chroma.Error: "#960050 bg:#1e0010",
|
||||||
chroma.Comment: "#75715e",
|
chroma.Comment: "#75715e",
|
||||||
@@ -32,4 +31,3 @@ var MonokaiLight = Register(chroma.NewStyle("monokailight", chroma.StyleEntries{
|
|||||||
chroma.GenericStrong: "bold",
|
chroma.GenericStrong: "bold",
|
||||||
chroma.Background: " bg:#fafafa",
|
chroma.Background: " bg:#fafafa",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Murphy style.
|
// Murphy style.
|
||||||
var Murphy = Register(chroma.NewStyle("murphy", chroma.StyleEntries{
|
var Murphy = Register(chroma.MustNewStyle("murphy", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "#666 italic",
|
chroma.Comment: "#666 italic",
|
||||||
chroma.CommentPreproc: "#579 noitalic",
|
chroma.CommentPreproc: "#579 noitalic",
|
||||||
@@ -57,4 +56,3 @@ var Murphy = Register(chroma.NewStyle("murphy", chroma.StyleEntries{
|
|||||||
chroma.Error: "#F00 bg:#FAA",
|
chroma.Error: "#F00 bg:#FAA",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Native style.
|
// Native style.
|
||||||
var Native = Register(chroma.NewStyle("native", chroma.StyleEntries{
|
var Native = Register(chroma.MustNewStyle("native", chroma.StyleEntries{
|
||||||
chroma.Background: "#d0d0d0 bg:#202020",
|
chroma.Background: "#d0d0d0 bg:#202020",
|
||||||
chroma.TextWhitespace: "#666666",
|
chroma.TextWhitespace: "#666666",
|
||||||
chroma.Comment: "italic #999999",
|
chroma.Comment: "italic #999999",
|
||||||
@@ -40,4 +39,3 @@ var Native = Register(chroma.NewStyle("native", chroma.StyleEntries{
|
|||||||
chroma.GenericTraceback: "#d22323",
|
chroma.GenericTraceback: "#d22323",
|
||||||
chroma.Error: "bg:#e3d2d2 #a61717",
|
chroma.Error: "bg:#e3d2d2 #a61717",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// ParaisoDark style.
|
// ParaisoDark style.
|
||||||
var ParaisoDark = Register(chroma.NewStyle("paraiso-dark", chroma.StyleEntries{
|
var ParaisoDark = Register(chroma.MustNewStyle("paraiso-dark", chroma.StyleEntries{
|
||||||
chroma.Text: "#e7e9db",
|
chroma.Text: "#e7e9db",
|
||||||
chroma.Error: "#ef6155",
|
chroma.Error: "#ef6155",
|
||||||
chroma.Comment: "#776e71",
|
chroma.Comment: "#776e71",
|
||||||
@@ -43,4 +42,3 @@ var ParaisoDark = Register(chroma.NewStyle("paraiso-dark", chroma.StyleEntries{
|
|||||||
chroma.GenericSubheading: "bold #5bc4bf",
|
chroma.GenericSubheading: "bold #5bc4bf",
|
||||||
chroma.Background: " bg:#2f1e2e",
|
chroma.Background: " bg:#2f1e2e",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// ParaisoLight style.
|
// ParaisoLight style.
|
||||||
var ParaisoLight = Register(chroma.NewStyle("paraiso-light", chroma.StyleEntries{
|
var ParaisoLight = Register(chroma.MustNewStyle("paraiso-light", chroma.StyleEntries{
|
||||||
chroma.Text: "#2f1e2e",
|
chroma.Text: "#2f1e2e",
|
||||||
chroma.Error: "#ef6155",
|
chroma.Error: "#ef6155",
|
||||||
chroma.Comment: "#8d8687",
|
chroma.Comment: "#8d8687",
|
||||||
@@ -43,4 +42,3 @@ var ParaisoLight = Register(chroma.NewStyle("paraiso-light", chroma.StyleEntries
|
|||||||
chroma.GenericSubheading: "bold #5bc4bf",
|
chroma.GenericSubheading: "bold #5bc4bf",
|
||||||
chroma.Background: " bg:#e7e9db",
|
chroma.Background: " bg:#e7e9db",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Pastie style.
|
// Pastie style.
|
||||||
var Pastie = Register(chroma.NewStyle("pastie", chroma.StyleEntries{
|
var Pastie = Register(chroma.MustNewStyle("pastie", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "#888888",
|
chroma.Comment: "#888888",
|
||||||
chroma.CommentPreproc: "bold #cc0000",
|
chroma.CommentPreproc: "bold #cc0000",
|
||||||
@@ -50,4 +49,3 @@ var Pastie = Register(chroma.NewStyle("pastie", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#e3d2d2 #a61717",
|
chroma.Error: "bg:#e3d2d2 #a61717",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Perldoc style.
|
// Perldoc style.
|
||||||
var Perldoc = Register(chroma.NewStyle("perldoc", chroma.StyleEntries{
|
var Perldoc = Register(chroma.MustNewStyle("perldoc", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "#228B22",
|
chroma.Comment: "#228B22",
|
||||||
chroma.CommentPreproc: "#1e889b",
|
chroma.CommentPreproc: "#1e889b",
|
||||||
@@ -42,4 +41,3 @@ var Perldoc = Register(chroma.NewStyle("perldoc", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#e3d2d2 #a61717",
|
chroma.Error: "bg:#e3d2d2 #a61717",
|
||||||
chroma.Background: " bg:#eeeedd",
|
chroma.Background: " bg:#eeeedd",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Pygments default theme.
|
// Pygments default theme.
|
||||||
var Pygments = Register(chroma.NewStyle("pygments", map[chroma.TokenType]string{
|
var Pygments = Register(chroma.MustNewStyle("pygments", map[chroma.TokenType]string{
|
||||||
chroma.Whitespace: "#bbbbbb",
|
chroma.Whitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #408080",
|
chroma.Comment: "italic #408080",
|
||||||
chroma.CommentPreproc: "noitalic #BC7A00",
|
chroma.CommentPreproc: "noitalic #BC7A00",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// RainbowDash style.
|
// RainbowDash style.
|
||||||
var RainbowDash = Register(chroma.NewStyle("rainbow_dash", chroma.StyleEntries{
|
var RainbowDash = Register(chroma.MustNewStyle("rainbow_dash", chroma.StyleEntries{
|
||||||
chroma.Comment: "italic #0080ff",
|
chroma.Comment: "italic #0080ff",
|
||||||
chroma.CommentPreproc: "noitalic",
|
chroma.CommentPreproc: "noitalic",
|
||||||
chroma.CommentSpecial: "bold",
|
chroma.CommentSpecial: "bold",
|
||||||
@@ -45,4 +44,3 @@ var RainbowDash = Register(chroma.NewStyle("rainbow_dash", chroma.StyleEntries{
|
|||||||
chroma.TextWhitespace: "#cbcbcb",
|
chroma.TextWhitespace: "#cbcbcb",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Rrt style.
|
// Rrt style.
|
||||||
var Rrt = Register(chroma.NewStyle("rrt", chroma.StyleEntries{
|
var Rrt = Register(chroma.MustNewStyle("rrt", chroma.StyleEntries{
|
||||||
chroma.Comment: "#00ff00",
|
chroma.Comment: "#00ff00",
|
||||||
chroma.NameFunction: "#ffff00",
|
chroma.NameFunction: "#ffff00",
|
||||||
chroma.NameVariable: "#eedd82",
|
chroma.NameVariable: "#eedd82",
|
||||||
@@ -17,4 +16,3 @@ var Rrt = Register(chroma.NewStyle("rrt", chroma.StyleEntries{
|
|||||||
chroma.KeywordType: "#ee82ee",
|
chroma.KeywordType: "#ee82ee",
|
||||||
chroma.Background: " bg:#000000",
|
chroma.Background: " bg:#000000",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// SwapOff theme.
|
// SwapOff theme.
|
||||||
var SwapOff = Register(chroma.NewStyle("swapoff", map[chroma.TokenType]string{
|
var SwapOff = Register(chroma.MustNewStyle("swapoff", map[chroma.TokenType]string{
|
||||||
chroma.Background: "#lightgray bg:#black",
|
chroma.Background: "#lightgray bg:#black",
|
||||||
chroma.Number: "bold #ansiyellow",
|
chroma.Number: "bold #ansiyellow",
|
||||||
chroma.Comment: "#ansiteal",
|
chroma.Comment: "#ansiteal",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Tango style.
|
// Tango style.
|
||||||
var Tango = Register(chroma.NewStyle("tango", chroma.StyleEntries{
|
var Tango = Register(chroma.MustNewStyle("tango", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "underline #f8f8f8",
|
chroma.TextWhitespace: "underline #f8f8f8",
|
||||||
chroma.Error: "#a40000 border:#ef2929",
|
chroma.Error: "#a40000 border:#ef2929",
|
||||||
chroma.Other: "#000000",
|
chroma.Other: "#000000",
|
||||||
@@ -77,4 +76,3 @@ var Tango = Register(chroma.NewStyle("tango", chroma.StyleEntries{
|
|||||||
chroma.GenericTraceback: "bold #a40000",
|
chroma.GenericTraceback: "bold #a40000",
|
||||||
chroma.Background: " bg:#f8f8f8",
|
chroma.Background: " bg:#f8f8f8",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Trac style.
|
// Trac style.
|
||||||
var Trac = Register(chroma.NewStyle("trac", chroma.StyleEntries{
|
var Trac = Register(chroma.MustNewStyle("trac", chroma.StyleEntries{
|
||||||
chroma.TextWhitespace: "#bbbbbb",
|
chroma.TextWhitespace: "#bbbbbb",
|
||||||
chroma.Comment: "italic #999988",
|
chroma.Comment: "italic #999988",
|
||||||
chroma.CommentPreproc: "bold noitalic #999999",
|
chroma.CommentPreproc: "bold noitalic #999999",
|
||||||
@@ -40,4 +39,3 @@ var Trac = Register(chroma.NewStyle("trac", chroma.StyleEntries{
|
|||||||
chroma.Error: "bg:#e3d2d2 #a61717",
|
chroma.Error: "bg:#e3d2d2 #a61717",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Vim style.
|
// Vim style.
|
||||||
var Vim = Register(chroma.NewStyle("vim", chroma.StyleEntries{
|
var Vim = Register(chroma.MustNewStyle("vim", chroma.StyleEntries{
|
||||||
chroma.Background: "#cccccc bg:#000000",
|
chroma.Background: "#cccccc bg:#000000",
|
||||||
chroma.Comment: "#000080",
|
chroma.Comment: "#000080",
|
||||||
chroma.CommentSpecial: "bold #cd0000",
|
chroma.CommentSpecial: "bold #cd0000",
|
||||||
@@ -34,4 +33,3 @@ var Vim = Register(chroma.NewStyle("vim", chroma.StyleEntries{
|
|||||||
chroma.GenericTraceback: "#04D",
|
chroma.GenericTraceback: "#04D",
|
||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// VisualStudio style.
|
// VisualStudio style.
|
||||||
var VisualStudio = Register(chroma.NewStyle("vs", chroma.StyleEntries{
|
var VisualStudio = Register(chroma.MustNewStyle("vs", chroma.StyleEntries{
|
||||||
chroma.Comment: "#008000",
|
chroma.Comment: "#008000",
|
||||||
chroma.CommentPreproc: "#0000ff",
|
chroma.CommentPreproc: "#0000ff",
|
||||||
chroma.Keyword: "#0000ff",
|
chroma.Keyword: "#0000ff",
|
||||||
@@ -22,4 +21,3 @@ var VisualStudio = Register(chroma.NewStyle("vs", chroma.StyleEntries{
|
|||||||
chroma.Error: "border:#FF0000",
|
chroma.Error: "border:#FF0000",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package styles
|
package styles
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -6,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Xcode style.
|
// Xcode style.
|
||||||
var Xcode = Register(chroma.NewStyle("xcode", chroma.StyleEntries{
|
var Xcode = Register(chroma.MustNewStyle("xcode", chroma.StyleEntries{
|
||||||
chroma.Comment: "#177500",
|
chroma.Comment: "#177500",
|
||||||
chroma.CommentPreproc: "#633820",
|
chroma.CommentPreproc: "#633820",
|
||||||
chroma.LiteralString: "#C41A16",
|
chroma.LiteralString: "#C41A16",
|
||||||
@@ -28,4 +27,3 @@ var Xcode = Register(chroma.NewStyle("xcode", chroma.StyleEntries{
|
|||||||
chroma.Error: "#000000",
|
chroma.Error: "#000000",
|
||||||
chroma.Background: " bg:#ffffff",
|
chroma.Background: " bg:#ffffff",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user