diff --git a/Gopkg.lock b/Gopkg.lock index 7a5f36c..35cd787 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -7,9 +7,34 @@ ".", "formatters/html", "lexers", + "lexers/a", + "lexers/b", + "lexers/c", + "lexers/d", + "lexers/e", + "lexers/f", + "lexers/g", + "lexers/h", + "lexers/i", + "lexers/internal", + "lexers/j", + "lexers/k", + "lexers/l", + "lexers/m", + "lexers/n", + "lexers/o", + "lexers/p", + "lexers/q", + "lexers/r", + "lexers/s", + "lexers/t", + "lexers/v", + "lexers/w", + "lexers/x", + "lexers/y", "styles" ] - revision = "v0.2.1" + revision = "v0.4.0" [[projects]] branch = "master" @@ -26,9 +51,15 @@ revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957" version = "v1.1.6" +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = ["unix"] + revision = "d8e400bc7db4870d786864138af681469693d18c" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "d000af53c3e4361e32b9cefa257a3a9e965a5b2a08fab400e6b4825e78da5919" + inputs-digest = "5c4b057af89d03566fba2045c8432d4c9b1957cc3148828d596d91ce8fa7adc4" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index a3d6d25..9553378 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -4,4 +4,8 @@ [[constraint]] name = "github.com/alecthomas/chroma" - revision = "v0.2.1" + revision = "v0.4.0" + +[[constraint]] + name = "golang.org/x/sys" + branch = "master" diff --git a/vendor/github.com/alecthomas/chroma/formatters/html/html.go b/vendor/github.com/alecthomas/chroma/formatters/html/html.go index 5af1918..58e8abe 100644 --- a/vendor/github.com/alecthomas/chroma/formatters/html/html.go +++ b/vendor/github.com/alecthomas/chroma/formatters/html/html.go @@ -159,7 +159,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []*chroma fmt.Fprintf(w, "
\n", f.styleAttr(css, chroma.LineTableTD))
fmt.Fprintf(w, "", f.styleAttr(css, chroma.Background))
- for index, _ := range lines {
+ for index := range lines {
line := f.baseLineNumber + index
highlight, next := f.shouldHighlight(highlightIndex, line)
if next {
@@ -169,7 +169,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []*chroma
fmt.Fprintf(w, "", f.styleAttr(css, chroma.LineHighlight))
}
- fmt.Fprintf(w, "%*d", f.styleAttr(css, chroma.LineNumbersTable), lineDigits, line)
+ fmt.Fprintf(w, "%*d\n", f.styleAttr(css, chroma.LineNumbersTable), lineDigits, line)
if highlight {
fmt.Fprintf(w, "")
@@ -241,13 +241,18 @@ func (f *Formatter) shouldHighlight(highlightIndex, line int) (bool, bool) {
func (f *Formatter) class(t chroma.TokenType) string {
for t != 0 {
- cls, ok := chroma.StandardTypes[t]
- if ok {
- return cls
+ if cls, ok := chroma.StandardTypes[t]; ok {
+ if cls != "" {
+ return f.prefix + cls
+ }
+ return ""
}
t = t.Parent()
}
- return chroma.StandardTypes[t]
+ if cls := chroma.StandardTypes[t]; cls != "" {
+ return f.prefix + cls
+ }
+ return ""
}
func (f *Formatter) styleAttr(styles map[chroma.TokenType]string, tt chroma.TokenType) string {
@@ -267,7 +272,7 @@ func (f *Formatter) styleAttr(styles map[chroma.TokenType]string, tt chroma.Toke
}
}
}
- return string(fmt.Sprintf(` style="%s"`, styles[tt]))
+ return fmt.Sprintf(` style="%s"`, styles[tt])
}
func (f *Formatter) tabWidthStyle() string {
@@ -281,9 +286,16 @@ func (f *Formatter) tabWidthStyle() string {
func (f *Formatter) WriteCSS(w io.Writer, style *chroma.Style) error {
css := f.styleToCSS(style)
// Special-case background as it is mapped to the outer ".chroma" class.
- if _, err := fmt.Fprintf(w, "/* %s */ .chroma { %s }\n", chroma.Background, css[chroma.Background]); err != nil {
+ if _, err := fmt.Fprintf(w, "/* %s */ .%schroma { %s }\n", chroma.Background, f.prefix, css[chroma.Background]); err != nil {
return err
}
+ // Special-case code column of table to expand width.
+ if f.lineNumbers && f.lineNumbersInTable {
+ if _, err := fmt.Fprintf(w, "/* %s */ .%schroma .%s:last-child { width: 100%%; }",
+ chroma.LineTableTD, f.prefix, f.class(chroma.LineTableTD)); err != nil {
+ return err
+ }
+ }
tts := []int{}
for tt := range css {
tts = append(tts, int(tt))
@@ -295,7 +307,7 @@ func (f *Formatter) WriteCSS(w io.Writer, style *chroma.Style) error {
continue
}
styles := css[tt]
- if _, err := fmt.Fprintf(w, "/* %s */ .chroma .%s { %s }\n", tt, f.class(tt), styles); err != nil {
+ if _, err := fmt.Fprintf(w, "/* %s */ .%schroma .%s { %s }\n", tt, f.prefix, f.class(tt), styles); err != nil {
return err
}
}
@@ -318,13 +330,12 @@ func (f *Formatter) styleToCSS(style *chroma.Style) map[chroma.TokenType]string
}
classes[chroma.Background] += f.tabWidthStyle()
lineNumbersStyle := "margin-right: 0.4em; padding: 0 0.4em 0 0.4em;"
- // all rules begin with default rules followed by user provided rules
+ // All rules begin with default rules followed by user provided rules
classes[chroma.LineNumbers] = lineNumbersStyle + classes[chroma.LineNumbers]
- classes[chroma.LineNumbersTable] = lineNumbersStyle + " display: block;" + classes[chroma.LineNumbersTable]
+ classes[chroma.LineNumbersTable] = lineNumbersStyle + classes[chroma.LineNumbersTable]
classes[chroma.LineHighlight] = "display: block; width: 100%;" + classes[chroma.LineHighlight]
- classes[chroma.LineTable] = "border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block;" + classes[chroma.LineTable]
+ classes[chroma.LineTable] = "border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block;" + classes[chroma.LineTable]
classes[chroma.LineTableTD] = "vertical-align: top; padding: 0; margin: 0; border: 0;" + classes[chroma.LineTableTD]
-
return classes
}
@@ -348,10 +359,11 @@ func StyleEntryToCSS(e chroma.StyleEntry) string {
// Compress CSS attributes - remove spaces, transform 6-digit colours to 3.
func compressStyle(s string) string {
- s = strings.Replace(s, " ", "", -1)
parts := strings.Split(s, ";")
out := []string{}
for _, p := range parts {
+ p = strings.Join(strings.Fields(p), " ")
+ p = strings.Replace(p, ": ", ":", 1)
if strings.Contains(p, "#") {
c := p[len(p)-6:]
if c[0] == c[1] && c[2] == c[3] && c[4] == c[5] {
diff --git a/vendor/github.com/alecthomas/chroma/lexer.go b/vendor/github.com/alecthomas/chroma/lexer.go
index fbf4233..e881762 100644
--- a/vendor/github.com/alecthomas/chroma/lexer.go
+++ b/vendor/github.com/alecthomas/chroma/lexer.go
@@ -75,6 +75,8 @@ func (t *Token) Clone() *Token {
type TokeniseOptions struct {
// State to start tokenisation in. Defaults to "root".
State string
+ // Nested tokenisation.
+ Nested bool
}
// A Lexer for tokenising source code.
diff --git a/vendor/github.com/alecthomas/chroma/lexers/abnf.go b/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go
similarity index 91%
rename from vendor/github.com/alecthomas/chroma/lexers/abnf.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/abnf.go
index c66e80f..ff29aed 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/abnf.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/abnf.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Abnf lexer.
-var Abnf = Register(MustNewLexer(
+var Abnf = internal.Register(MustNewLexer(
&Config{
Name: "ABNF",
Aliases: []string{"abnf"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/actionscript.go b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/actionscript.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go
index cdc5cde..43d3852 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/actionscript.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Actionscript lexer.
-var Actionscript = Register(MustNewLexer(
+var Actionscript = internal.Register(MustNewLexer(
&Config{
Name: "ActionScript",
Aliases: []string{"as", "actionscript"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/actionscript3.go b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/actionscript3.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go
index 86037a5..3404bd5 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/actionscript3.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/actionscript3.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Actionscript 3 lexer.
-var Actionscript3 = Register(MustNewLexer(
+var Actionscript3 = internal.Register(MustNewLexer(
&Config{
Name: "ActionScript 3",
Aliases: []string{"as3", "actionscript3"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/ada.go b/vendor/github.com/alecthomas/chroma/lexers/a/ada.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/ada.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/ada.go
index f11ed8c..d9b34e3 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/ada.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/ada.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Ada lexer.
-var Ada = Register(MustNewLexer(
+var Ada = internal.Register(MustNewLexer(
&Config{
Name: "Ada",
Aliases: []string{"ada", "ada95", "ada2005"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/angular2.go b/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go
similarity index 93%
rename from vendor/github.com/alecthomas/chroma/lexers/angular2.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/angular2.go
index 0e65b7f..5258c92 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/angular2.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/angular2.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Angular2 lexer.
-var Angular2 = Register(MustNewLexer(
+var Angular2 = internal.Register(MustNewLexer(
&Config{
Name: "Angular2",
Aliases: []string{"ng2"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/antlr.go b/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/antlr.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/antlr.go
index 9260925..d7649d4 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/antlr.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/antlr.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// ANTLR lexer.
-var ANTLR = Register(MustNewLexer(
+var ANTLR = internal.Register(MustNewLexer(
&Config{
Name: "ANTLR",
Aliases: []string{"antlr"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/apache.go b/vendor/github.com/alecthomas/chroma/lexers/a/apache.go
similarity index 91%
rename from vendor/github.com/alecthomas/chroma/lexers/apache.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/apache.go
index 7ef5e0b..6c56a1d 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/apache.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/apache.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Apacheconf lexer.
-var Apacheconf = Register(MustNewLexer(
+var Apacheconf = internal.Register(MustNewLexer(
&Config{
Name: "ApacheConf",
Aliases: []string{"apacheconf", "aconf", "apache"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/apl.go b/vendor/github.com/alecthomas/chroma/lexers/a/apl.go
similarity index 92%
rename from vendor/github.com/alecthomas/chroma/lexers/apl.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/apl.go
index 1d50b2a..820e13b 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/apl.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/apl.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Apl lexer.
-var Apl = Register(MustNewLexer(
+var Apl = internal.Register(MustNewLexer(
&Config{
Name: "APL",
Aliases: []string{"apl"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/applescript.go b/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/applescript.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/applescript.go
index 8e7cac0..84ddf1f 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/applescript.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/applescript.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Applescript lexer.
-var Applescript = Register(MustNewLexer(
+var Applescript = internal.Register(MustNewLexer(
&Config{
Name: "AppleScript",
Aliases: []string{"applescript"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/awk.go b/vendor/github.com/alecthomas/chroma/lexers/a/awk.go
similarity index 94%
rename from vendor/github.com/alecthomas/chroma/lexers/awk.go
rename to vendor/github.com/alecthomas/chroma/lexers/a/awk.go
index 60424ee..d9198f1 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/awk.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/a/awk.go
@@ -1,11 +1,12 @@
-package lexers
+package a
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Awk lexer.
-var Awk = Register(MustNewLexer(
+var Awk = internal.Register(MustNewLexer(
&Config{
Name: "Awk",
Aliases: []string{"awk", "gawk", "mawk", "nawk"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/bash.go b/vendor/github.com/alecthomas/chroma/lexers/b/bash.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/bash.go
rename to vendor/github.com/alecthomas/chroma/lexers/b/bash.go
index 4a418cd..ff4e4a8 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/bash.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/b/bash.go
@@ -1,15 +1,16 @@
-package lexers
+package b
import (
"regexp"
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`)
// Bash lexer.
-var Bash = Register(MustNewLexer(
+var Bash = internal.Register(MustNewLexer(
&Config{
Name: "Bash",
Aliases: []string{"bash", "sh", "ksh", "zsh", "shell"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/batch.go b/vendor/github.com/alecthomas/chroma/lexers/b/batch.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/batch.go
rename to vendor/github.com/alecthomas/chroma/lexers/b/batch.go
index ae32c18..dc6ce52 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/batch.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/b/batch.go
@@ -1,11 +1,12 @@
-package lexers
+package b
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Batchfile lexer.
-var Batchfile = Register(MustNewLexer(
+var Batchfile = internal.Register(MustNewLexer(
&Config{
Name: "Batchfile",
Aliases: []string{"bat", "batch", "dosbatch", "winbatch"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/blitz.go b/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/blitz.go
rename to vendor/github.com/alecthomas/chroma/lexers/b/blitz.go
index 7626783..5d5ffc8 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/blitz.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/b/blitz.go
@@ -1,11 +1,12 @@
-package lexers
+package b
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Blitzbasic lexer.
-var Blitzbasic = Register(MustNewLexer(
+var Blitzbasic = internal.Register(MustNewLexer(
&Config{
Name: "BlitzBasic",
Aliases: []string{"blitzbasic", "b3d", "bplus"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/bnf.go b/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go
similarity index 79%
rename from vendor/github.com/alecthomas/chroma/lexers/bnf.go
rename to vendor/github.com/alecthomas/chroma/lexers/b/bnf.go
index c7456e3..5123a45 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/bnf.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/b/bnf.go
@@ -1,11 +1,12 @@
-package lexers
+package b
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Bnf lexer.
-var Bnf = Register(MustNewLexer(
+var Bnf = internal.Register(MustNewLexer(
&Config{
Name: "BNF",
Aliases: []string{"bnf"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/brainfuck.go b/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go
similarity index 85%
rename from vendor/github.com/alecthomas/chroma/lexers/brainfuck.go
rename to vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go
index c2c0396..6fac5f5 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/brainfuck.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/b/brainfuck.go
@@ -1,11 +1,12 @@
-package lexers
+package b
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Brainfuck lexer.
-var Brainfuck = Register(MustNewLexer(
+var Brainfuck = internal.Register(MustNewLexer(
&Config{
Name: "Brainfuck",
Aliases: []string{"brainfuck", "bf"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/c.go b/vendor/github.com/alecthomas/chroma/lexers/c/c.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/c.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/c.go
index b42412d..df2c0fa 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/c.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/c.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// C lexer.
-var C = Register(MustNewLexer(
+var C = internal.Register(MustNewLexer(
&Config{
Name: "C",
Aliases: []string{"c"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/capnproto.go b/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go
similarity index 93%
rename from vendor/github.com/alecthomas/chroma/lexers/capnproto.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go
index 5c9d7ce..0f9d03c 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/capnproto.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/capnproto.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cap'N'Proto Proto lexer.
-var CapNProto = Register(MustNewLexer(
+var CapNProto = internal.Register(MustNewLexer(
&Config{
Name: "Cap'n Proto",
Aliases: []string{"capnp"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/ceylon.go b/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/ceylon.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go
index 3b545f7..07324ca 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/ceylon.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/ceylon.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Ceylon lexer.
-var Ceylon = Register(MustNewLexer(
+var Ceylon = internal.Register(MustNewLexer(
&Config{
Name: "Ceylon",
Aliases: []string{"ceylon"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cfengine3.go b/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go
similarity index 94%
rename from vendor/github.com/alecthomas/chroma/lexers/cfengine3.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go
index ef607e7..f96252f 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cfengine3.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cfengine3.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cfengine3 lexer.
-var Cfengine3 = Register(MustNewLexer(
+var Cfengine3 = internal.Register(MustNewLexer(
&Config{
Name: "CFEngine3",
Aliases: []string{"cfengine3", "cf3"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/chaiscript.go b/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go
similarity index 94%
rename from vendor/github.com/alecthomas/chroma/lexers/chaiscript.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go
index a2ad7bf..d2aa50d 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/chaiscript.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/chaiscript.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Chaiscript lexer.
-var Chaiscript = Register(MustNewLexer(
+var Chaiscript = internal.Register(MustNewLexer(
&Config{
Name: "ChaiScript",
Aliases: []string{"chai", "chaiscript"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cheetah.go b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
similarity index 80%
rename from vendor/github.com/alecthomas/chroma/lexers/cheetah.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
index d9bcad8..b2cb9c4 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cheetah.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
@@ -1,11 +1,13 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/lexers/p" // nolint
)
// Cheetah lexer.
-var Cheetah = Register(MustNewLexer(
+var Cheetah = internal.Register(MustNewLexer(
&Config{
Name: "Cheetah",
Aliases: []string{"cheetah", "spitfire"},
@@ -18,9 +20,9 @@ var Cheetah = Register(MustNewLexer(
{`#[*](.|\n)*?[*]#`, Comment, nil},
{`#end[^#\n]*(?:#|$)`, CommentPreproc, nil},
{`#slurp$`, CommentPreproc, nil},
- {`(#[a-zA-Z]+)([^#\n]*)(#|$)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil},
- {`(\$)([a-zA-Z_][\w.]*\w)`, ByGroups(CommentPreproc, Using(Python, nil)), nil},
- {`(\$\{!?)(.*?)(\})(?s)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil},
+ {`(#[a-zA-Z]+)([^#\n]*)(#|$)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
+ {`(\$)([a-zA-Z_][\w.]*\w)`, ByGroups(CommentPreproc, Using(Python)), nil},
+ {`(\$\{!?)(.*?)(\})(?s)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
{`(?sx)
(.+?) # anything, followed by:
(?:
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cl.go b/vendor/github.com/alecthomas/chroma/lexers/c/cl.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/cl.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cl.go
index cd0eac8..6e048de 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cl.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cl.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Common Lisp lexer.
-var CommonLisp = Register(MustNewLexer(
+var CommonLisp = internal.Register(MustNewLexer(
&Config{
Name: "Common Lisp",
Aliases: []string{"common-lisp", "cl", "lisp"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/clojure.go b/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/clojure.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/clojure.go
index ba0f0ae..e63752a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/clojure.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/clojure.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Clojure lexer.
-var Clojure = Register(MustNewLexer(
+var Clojure = internal.Register(MustNewLexer(
&Config{
Name: "Clojure",
Aliases: []string{"clojure", "clj"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cmake.go b/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go
similarity index 91%
rename from vendor/github.com/alecthomas/chroma/lexers/cmake.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cmake.go
index 04128a4..163f17d 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cmake.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cmake.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cmake lexer.
-var Cmake = Register(MustNewLexer(
+var Cmake = internal.Register(MustNewLexer(
&Config{
Name: "CMake",
Aliases: []string{"cmake"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cobol.go b/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go
similarity index 98%
rename from vendor/github.com/alecthomas/chroma/lexers/cobol.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cobol.go
index 307047b..e9ae0bb 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cobol.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cobol.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cobol lexer.
-var Cobol = Register(MustNewLexer(
+var Cobol = internal.Register(MustNewLexer(
&Config{
Name: "COBOL",
Aliases: []string{"cobol"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/coffee.go b/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/coffee.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/coffee.go
index 18a3bad..e402b8f 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/coffee.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/coffee.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Coffeescript lexer.
-var Coffeescript = Register(MustNewLexer(
+var Coffeescript = internal.Register(MustNewLexer(
&Config{
Name: "CoffeeScript",
Aliases: []string{"coffee-script", "coffeescript", "coffee"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/coldfusion.go b/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go
similarity index 93%
rename from vendor/github.com/alecthomas/chroma/lexers/coldfusion.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go
index 367a870..2f12472 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/coldfusion.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/coldfusion.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cfstatement lexer.
-var Cfstatement = Register(MustNewLexer(
+var Cfstatement = internal.Register(MustNewLexer(
&Config{
Name: "cfstatement",
Aliases: []string{"cfs"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/coq.go b/vendor/github.com/alecthomas/chroma/lexers/c/coq.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/coq.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/coq.go
index 07ec2d3..e69a5c1 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/coq.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/coq.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Coq lexer.
-var Coq = Register(MustNewLexer(
+var Coq = internal.Register(MustNewLexer(
&Config{
Name: "Coq",
Aliases: []string{"coq"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cpp.go b/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/cpp.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cpp.go
index 18bf409..b60f0b4 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cpp.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cpp.go
@@ -1,16 +1,18 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// CPP lexer.
-var CPP = Register(MustNewLexer(
+var CPP = internal.Register(MustNewLexer(
&Config{
Name: "C++",
Aliases: []string{"cpp", "c++"},
Filenames: []string{"*.cpp", "*.hpp", "*.c++", "*.h++", "*.cc", "*.hh", "*.cxx", "*.hxx", "*.C", "*.H", "*.cp", "*.CPP"},
MimeTypes: []string{"text/x-c++hdr", "text/x-c++src"},
+ EnsureNL: true,
},
Rules{
"statements": {
diff --git a/vendor/github.com/alecthomas/chroma/lexers/crystal.go b/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/crystal.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/crystal.go
index bb124cd..69e053c 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/crystal.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/crystal.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Crystal lexer.
-var Crystal = Register(MustNewLexer(
+var Crystal = internal.Register(MustNewLexer(
&Config{
Name: "Crystal",
Aliases: []string{"cr", "crystal"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/csharp.go b/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/csharp.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/csharp.go
index 75cfe79..bb0c71a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/csharp.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/csharp.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// CSharp lexer.
-var CSharp = Register(MustNewLexer(
+var CSharp = internal.Register(MustNewLexer(
&Config{
Name: "C#",
Aliases: []string{"csharp", "c#"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/css.go b/vendor/github.com/alecthomas/chroma/lexers/c/css.go
similarity index 74%
rename from vendor/github.com/alecthomas/chroma/lexers/css.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/css.go
index 7e3dd56..fedc809 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/css.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/css.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// CSS lexer.
-var CSS = Register(MustNewLexer(
+var CSS = internal.Register(MustNewLexer(
&Config{
Name: "CSS",
Aliases: []string{"css"},
@@ -50,14 +51,7 @@ var CSS = Register(MustNewLexer(
{`/\*(?:.|\n)*?\*/`, Comment, nil},
},
"value-start": {
- {`\s+`, Text, nil},
- {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), NameBuiltinPseudo, nil},
- Include("urls"),
- {`(attr|blackness|blend|blenda|blur|brightness|calc|circle|color-mod|contrast|counter|cubic-bezier|device-cmyk|drop-shadow|ellipse|gray|grayscale|hsl|hsla|hue|hue-rotate|hwb|image|inset|invert|lightness|linear-gradient|matrix|matrix3d|opacity|perspective|polygon|radial-gradient|rect|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|saturation|scale|scale3d|scaleX|scaleY|scaleZ|sepia|shade|skewX|skewY|steps|tint|toggle|translate|translate3d|translateX|translateY|translateZ|whiteness)(\()`, ByGroups(NameBuiltin, Punctuation), Push("function-start")},
- {`([a-zA-Z_][\w-]+)(\()`, ByGroups(NameFunction, Punctuation), Push("function-start")},
- {Words(``, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil},
- {Words(``, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil},
- {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil},
+ Include("common-values"),
{Words(``, `\b`, `align-content`, `align-items`, `align-self`, `alignment-baseline`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `azimuth`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `baseline-shift`, `bookmark-label`, `bookmark-level`, `bookmark-state`, `border`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-boundary`, `border-collapse`, `border-color`, `border-image`, `border-image-outset`, `border-image-repeat`, `border-image-slice`, `border-image-source`, `border-image-width`, `border-left`, `border-left-color`, `border-left-style`, `border-left-width`, `border-radius`, `border-right`, `border-right-color`, `border-right-style`, `border-right-width`, `border-spacing`, `border-style`, `border-top`, `border-top-color`, `border-top-left-radius`, `border-top-right-radius`, `border-top-style`, `border-top-width`, `border-width`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `box-snap`, `box-suppress`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret`, `caret-animation`, `caret-color`, `caret-shape`, `chains`, `clear`, `clip`, `clip-path`, `clip-rule`, `color`, `color-interpolation-filters`, `column-count`, `column-fill`, `column-gap`, `column-rule`, `column-rule-color`, `column-rule-style`, `column-rule-width`, `column-span`, `column-width`, `columns`, `content`, `counter-increment`, `counter-reset`, `counter-set`, `crop`, `cue`, `cue-after`, `cue-before`, `cursor`, `direction`, `display`, `dominant-baseline`, `elevation`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `float-defer`, `float-offset`, `float-reference`, `flood-color`, `flood-opacity`, `flow`, `flow-from`, `flow-into`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-alternates`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `glyph-orientation-vertical`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-gap`, `grid-column-start`, `grid-gap`, `grid-row`, `grid-row-end`, `grid-row-gap`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphenate-character`, `hyphenate-limit-chars`, `hyphenate-limit-last`, `hyphenate-limit-lines`, `hyphenate-limit-zone`, `hyphens`, `image-orientation`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-grid`, `line-height`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-bottom`, `margin-left`, `margin-right`, `margin-top`, `marker-side`, `marquee-direction`, `marquee-loop`, `marquee-speed`, `marquee-style`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-outset`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `motion`, `motion-offset`, `motion-path`, `motion-rotation`, `move-to`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset-after`, `offset-before`, `offset-end`, `offset-start`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-style`, `overflow-wrap`, `overflow-x`, `overflow-y`, `padding`, `padding-bottom`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-policy`, `pause`, `pause-after`, `pause-before`, `perspective`, `perspective-origin`, `pitch`, `pitch-range`, `play-during`, `polar-angle`, `polar-distance`, `position`, `presentation-level`, `quotes`, `region-fragment`, `resize`, `rest`, `rest-after`, `rest-before`, `richness`, `right`, `rotation`, `rotation-point`, `ruby-align`, `ruby-merge`, `ruby-position`, `running`, `scroll-snap-coordinate`, `scroll-snap-destination`, `scroll-snap-points-x`, `scroll-snap-points-y`, `scroll-snap-type`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `size`, `speak`, `speak-as`, `speak-header`, `speak-numeral`, `speak-punctuation`, `speech-rate`, `stress`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-emphasis`, `text-emphasis-color`, `text-emphasis-position`, `text-emphasis-style`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-shadow`, `text-space-collapse`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-position`, `text-wrap`, `top`, `transform`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `voice-balance`, `voice-duration`, `voice-family`, `voice-pitch`, `voice-range`, `voice-rate`, `voice-stress`, `voice-volume`, `volume`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`), Keyword, nil},
{`\!important`, CommentPreproc, nil},
{`/\*(?:.|\n)*?\*/`, Comment, nil},
@@ -71,14 +65,7 @@ var CSS = Register(MustNewLexer(
{`\}`, Punctuation, Pop(2)},
},
"function-start": {
- {`\s+`, Text, nil},
- Include("urls"),
- {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), KeywordPseudo, nil},
- {Words(``, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil},
- {Words(``, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil},
- {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil},
- {`(attr|blackness|blend|blenda|blur|brightness|calc|circle|color-mod|contrast|counter|cubic-bezier|device-cmyk|drop-shadow|ellipse|gray|grayscale|hsl|hsla|hue|hue-rotate|hwb|image|inset|invert|lightness|linear-gradient|matrix|matrix3d|opacity|perspective|polygon|radial-gradient|rect|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|saturation|scale|scale3d|scaleX|scaleY|scaleZ|sepia|shade|skewX|skewY|steps|tint|toggle|translate|translate3d|translateX|translateY|translateZ|whiteness)(\()`, ByGroups(NameBuiltin, Punctuation), Push("function-start")},
- {`([a-zA-Z_][\w-]+)(\()`, ByGroups(NameFunction, Punctuation), Push("function-start")},
+ Include("common-values"),
{`/\*(?:.|\n)*?\*/`, Comment, nil},
Include("numeric-values"),
{`[*+/-]`, Operator, nil},
@@ -88,6 +75,16 @@ var CSS = Register(MustNewLexer(
{`[a-zA-Z_-]\w*`, Name, nil},
{`\)`, Punctuation, Pop(1)},
},
+ "common-values": {
+ {`\s+`, Text, nil},
+ {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), KeywordPseudo, nil},
+ Include("urls"),
+ {`(attr|blackness|blend|blenda|blur|brightness|calc|circle|color-mod|contrast|counter|cubic-bezier|device-cmyk|drop-shadow|ellipse|gray|grayscale|hsl|hsla|hue|hue-rotate|hwb|image|inset|invert|lightness|linear-gradient|matrix|matrix3d|opacity|perspective|polygon|radial-gradient|rect|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|saturation|scale|scale3d|scaleX|scaleY|scaleZ|sepia|shade|skewX|skewY|steps|tint|toggle|translate|translate3d|translateX|translateY|translateZ|whiteness)(\()`, ByGroups(NameBuiltin, Punctuation), Push("function-start")},
+ {`([a-zA-Z_][\w-]+)(\()`, ByGroups(NameFunction, Punctuation), Push("function-start")},
+ {Words(``, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil},
+ {Words(``, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil},
+ {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil},
+ },
"urls": {
{`(url)(\()(".*?")(\))`, ByGroups(NameBuiltin, Punctuation, LiteralStringDouble, Punctuation), nil},
{`(url)(\()('.*?')(\))`, ByGroups(NameBuiltin, Punctuation, LiteralStringSingle, Punctuation), nil},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/cython.go b/vendor/github.com/alecthomas/chroma/lexers/c/cython.go
similarity index 98%
rename from vendor/github.com/alecthomas/chroma/lexers/cython.go
rename to vendor/github.com/alecthomas/chroma/lexers/c/cython.go
index 3b1e2d6..701e2b7 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/cython.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cython.go
@@ -1,11 +1,12 @@
-package lexers
+package c
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Cython lexer.
-var Cython = Register(MustNewLexer(
+var Cython = internal.Register(MustNewLexer(
&Config{
Name: "Cython",
Aliases: []string{"cython", "pyx", "pyrex"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/dart.go b/vendor/github.com/alecthomas/chroma/lexers/d/dart.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/dart.go
rename to vendor/github.com/alecthomas/chroma/lexers/d/dart.go
index e37dad1..6dab3b4 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/dart.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/d/dart.go
@@ -1,11 +1,12 @@
-package lexers
+package d
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Dart lexer.
-var Dart = Register(MustNewLexer(
+var Dart = internal.Register(MustNewLexer(
&Config{
Name: "Dart",
Aliases: []string{"dart"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/diff.go b/vendor/github.com/alecthomas/chroma/lexers/d/diff.go
similarity index 85%
rename from vendor/github.com/alecthomas/chroma/lexers/diff.go
rename to vendor/github.com/alecthomas/chroma/lexers/d/diff.go
index 5233681..264ed45 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/diff.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/d/diff.go
@@ -1,11 +1,12 @@
-package lexers
+package d
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Diff lexer.
-var Diff = Register(MustNewLexer(
+var Diff = internal.Register(MustNewLexer(
&Config{
Name: "Diff",
Aliases: []string{"diff", "udiff"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/django.go b/vendor/github.com/alecthomas/chroma/lexers/d/django.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/django.go
rename to vendor/github.com/alecthomas/chroma/lexers/d/django.go
index 36480f6..d72d99a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/django.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/d/django.go
@@ -1,11 +1,12 @@
-package lexers
+package d
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Django/Jinja lexer.
-var DjangoJinja = Register(MustNewLexer(
+var DjangoJinja = internal.Register(MustNewLexer(
&Config{
Name: "Django/Jinja",
Aliases: []string{"django", "jinja"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/docker.go b/vendor/github.com/alecthomas/chroma/lexers/d/docker.go
similarity index 78%
rename from vendor/github.com/alecthomas/chroma/lexers/docker.go
rename to vendor/github.com/alecthomas/chroma/lexers/d/docker.go
index f488d73..412646b 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/docker.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/d/docker.go
@@ -1,11 +1,13 @@
-package lexers
+package d
import (
. "github.com/alecthomas/chroma" // nolint
+ . "github.com/alecthomas/chroma/lexers/b"
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Docker lexer.
-var Docker = Register(MustNewLexer(
+var Docker = internal.Register(MustNewLexer(
&Config{
Name: "Docker",
Aliases: []string{"docker", "dockerfile"},
@@ -19,7 +21,7 @@ var Docker = Register(MustNewLexer(
{`^((?:FROM|MAINTAINER|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|WORKDIR))\b(.*)`, ByGroups(Keyword, LiteralString), nil},
{`#.*`, Comment, nil},
{`RUN`, Keyword, nil},
- {`(.*\\\n)*.+`, Using(Bash, nil), nil},
+ {`(.*\\\n)*.+`, Using(Bash), nil},
},
},
))
diff --git a/vendor/github.com/alecthomas/chroma/lexers/dtd.go b/vendor/github.com/alecthomas/chroma/lexers/d/dtd.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/dtd.go
rename to vendor/github.com/alecthomas/chroma/lexers/d/dtd.go
index a0b1e89..99bf5d3 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/dtd.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/d/dtd.go
@@ -1,11 +1,12 @@
-package lexers
+package d
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Dtd lexer.
-var Dtd = Register(MustNewLexer(
+var Dtd = internal.Register(MustNewLexer(
&Config{
Name: "DTD",
Aliases: []string{"dtd"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/ebnf.go b/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go
similarity index 91%
rename from vendor/github.com/alecthomas/chroma/lexers/ebnf.go
rename to vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go
index b962b74..42a3a37 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/ebnf.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/e/ebnf.go
@@ -1,11 +1,12 @@
-package lexers
+package e
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Ebnf lexer.
-var Ebnf = Register(MustNewLexer(
+var Ebnf = internal.Register(MustNewLexer(
&Config{
Name: "EBNF",
Aliases: []string{"ebnf"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/elixir.go b/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go
similarity index 98%
rename from vendor/github.com/alecthomas/chroma/lexers/elixir.go
rename to vendor/github.com/alecthomas/chroma/lexers/e/elixir.go
index 64d1c38..23fa8af 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/elixir.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/e/elixir.go
@@ -1,11 +1,12 @@
-package lexers
+package e
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Elixir lexer.
-var Elixir = Register(MustNewLexer(
+var Elixir = internal.Register(MustNewLexer(
&Config{
Name: "Elixir",
Aliases: []string{"elixir", "ex", "exs"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/elm.go b/vendor/github.com/alecthomas/chroma/lexers/e/elm.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/elm.go
rename to vendor/github.com/alecthomas/chroma/lexers/e/elm.go
index 31b3d86..a71c627 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/elm.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/e/elm.go
@@ -1,11 +1,12 @@
-package lexers
+package e
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Elm lexer.
-var Elm = Register(MustNewLexer(
+var Elm = internal.Register(MustNewLexer(
&Config{
Name: "Elm",
Aliases: []string{"elm"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/emacs.go b/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/emacs.go
rename to vendor/github.com/alecthomas/chroma/lexers/e/emacs.go
index 6d7a459..78ffda1 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/emacs.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/e/emacs.go
@@ -1,7 +1,8 @@
-package lexers
+package e
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
var (
@@ -521,7 +522,7 @@ var (
)
// EmacsLisp lexer.
-var EmacsLisp = Register(TypeRemappingLexer(MustNewLexer(
+var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLexer(
&Config{
Name: "EmacsLisp",
Aliases: []string{"emacs", "elisp", "emacs-lisp"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/erlang.go b/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/erlang.go
rename to vendor/github.com/alecthomas/chroma/lexers/e/erlang.go
index 1b1ba4e..63cd59a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/erlang.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/e/erlang.go
@@ -1,11 +1,12 @@
-package lexers
+package e
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Erlang lexer.
-var Erlang = Register(MustNewLexer(
+var Erlang = internal.Register(MustNewLexer(
&Config{
Name: "Erlang",
Aliases: []string{"erlang"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/factor.go b/vendor/github.com/alecthomas/chroma/lexers/f/factor.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/factor.go
rename to vendor/github.com/alecthomas/chroma/lexers/f/factor.go
index e1ad149..26c0d56 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/factor.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/f/factor.go
@@ -1,11 +1,12 @@
-package lexers
+package f
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Factor lexer.
-var Factor = Register(MustNewLexer(
+var Factor = internal.Register(MustNewLexer(
&Config{
Name: "Factor",
Aliases: []string{"factor"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/fish.go b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/fish.go
rename to vendor/github.com/alecthomas/chroma/lexers/f/fish.go
index e6b74b4..185fc92 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/fish.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go
@@ -1,11 +1,12 @@
-package lexers
+package f
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Fish lexer.
-var Fish = Register(MustNewLexer(
+var Fish = internal.Register(MustNewLexer(
&Config{
Name: "Fish",
Aliases: []string{"fish", "fishshell"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/forth.go b/vendor/github.com/alecthomas/chroma/lexers/f/forth.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/forth.go
rename to vendor/github.com/alecthomas/chroma/lexers/f/forth.go
index a6a4b3a..3fb3aa7 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/forth.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/f/forth.go
@@ -1,11 +1,12 @@
-package lexers
+package f
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Forth lexer.
-var Forth = Register(MustNewLexer(
+var Forth = internal.Register(MustNewLexer(
&Config{
Name: "Forth",
Aliases: []string{"forth"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/fortran.go b/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go
similarity index 98%
rename from vendor/github.com/alecthomas/chroma/lexers/fortran.go
rename to vendor/github.com/alecthomas/chroma/lexers/f/fortran.go
index 5c24b32..6c57afa 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/fortran.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/f/fortran.go
@@ -1,11 +1,12 @@
-package lexers
+package f
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Fortran lexer.
-var Fortran = Register(MustNewLexer(
+var Fortran = internal.Register(MustNewLexer(
&Config{
Name: "Fortran",
Aliases: []string{"fortran"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/fsharp.go b/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/fsharp.go
rename to vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go
index 5605871..d00f63d 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/fsharp.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/f/fsharp.go
@@ -1,11 +1,12 @@
-package lexers
+package f
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Fsharp lexer.
-var Fsharp = Register(MustNewLexer(
+var Fsharp = internal.Register(MustNewLexer(
&Config{
Name: "FSharp",
Aliases: []string{"fsharp"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/gas.go b/vendor/github.com/alecthomas/chroma/lexers/g/gas.go
similarity index 94%
rename from vendor/github.com/alecthomas/chroma/lexers/gas.go
rename to vendor/github.com/alecthomas/chroma/lexers/g/gas.go
index 5fbe72e..a922806 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/gas.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/g/gas.go
@@ -1,11 +1,12 @@
-package lexers
+package g
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Gas lexer.
-var Gas = Register(MustNewLexer(
+var Gas = internal.Register(MustNewLexer(
&Config{
Name: "GAS",
Aliases: []string{"gas", "asm"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/gdscript.go b/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/gdscript.go
rename to vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go
index c7c8fff..bfe3063 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/gdscript.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/g/gdscript.go
@@ -1,11 +1,12 @@
-package lexers
+package g
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// GDScript lexer.
-var GDScript = Register(MustNewLexer(
+var GDScript = internal.Register(MustNewLexer(
&Config{
Name: "GDScript",
Aliases: []string{"gdscript", "gd"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/genshi.go b/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go
similarity index 82%
rename from vendor/github.com/alecthomas/chroma/lexers/genshi.go
rename to vendor/github.com/alecthomas/chroma/lexers/g/genshi.go
index 3534b1b..0d3663a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/genshi.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/g/genshi.go
@@ -1,11 +1,13 @@
-package lexers
+package g
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/lexers/p"
)
// Genshi Text lexer.
-var GenshiText = Register(MustNewLexer(
+var GenshiText = internal.Register(MustNewLexer(
&Config{
Name: "Genshi Text",
Aliases: []string{"genshitext"},
@@ -22,20 +24,20 @@ var GenshiText = Register(MustNewLexer(
},
"directive": {
{`\n`, Text, Pop(1)},
- {`(?:def|for|if)\s+.*`, Using(Python, nil), Pop(1)},
- {`(choose|when|with)([^\S\n]+)(.*)`, ByGroups(Keyword, Text, Using(Python, nil)), Pop(1)},
+ {`(?:def|for|if)\s+.*`, Using(Python), Pop(1)},
+ {`(choose|when|with)([^\S\n]+)(.*)`, ByGroups(Keyword, Text, Using(Python)), Pop(1)},
{`(choose|otherwise)\b`, Keyword, Pop(1)},
{`(end\w*)([^\S\n]*)(.*)`, ByGroups(Keyword, Text, Comment), Pop(1)},
},
"variable": {
- {`(?)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil},
+ {`(<\?python)(.*?)(\?>)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
{`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil},
{`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")},
{`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")},
@@ -76,8 +78,8 @@ var genshiMarkupRules = Rules{
{`/?\s*>`, NameTag, Pop(1)},
},
"pyattr": {
- {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python, nil), LiteralString), Pop(1)},
- {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python, nil), LiteralString), Pop(1)},
+ {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
+ {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
{`[^\s>]+`, LiteralString, Pop(1)},
},
"tag": {
@@ -106,7 +108,7 @@ var genshiMarkupRules = Rules{
Include("variable"),
},
"variable": {
- {`(?)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)},
- {`.+?(?=<\s*/\s*script\s*>)`, Using(Javascript, nil), nil},
+ {`.+?(?=<\s*/\s*script\s*>)`, Using(Javascript), nil},
},
"style-content": {
{`(<)(\s*)(/)(\s*)(style)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)},
- {`.+?(?=<\s*/\s*style\s*>)`, Using(CSS, nil), nil},
+ {`.+?(?=<\s*/\s*style\s*>)`, Using(CSS), nil},
},
"attr": {
{`".*?"`, LiteralString, Pop(1)},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/http.go b/vendor/github.com/alecthomas/chroma/lexers/h/http.go
similarity index 86%
rename from vendor/github.com/alecthomas/chroma/lexers/http.go
rename to vendor/github.com/alecthomas/chroma/lexers/h/http.go
index 9f2b29c..67bc71a 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/http.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/h/http.go
@@ -1,12 +1,14 @@
-package lexers
+package h
import (
- . "github.com/alecthomas/chroma" // nolint
"strings"
+
+ . "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// HTTP lexer.
-var HTTP = Register(httpBodyContentTypeLexer(MustNewLexer(
+var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLexer(
&Config{
Name: "HTTP",
Aliases: []string{"http"},
@@ -17,7 +19,7 @@ var HTTP = Register(httpBodyContentTypeLexer(MustNewLexer(
},
Rules{
"root": {
- {`(GET|POST|PUT|DELETE|HEAD|OPTIONS|TRACE|PATCH)( +)([^ ]+)( +)(HTTP)(/)(1\.[01])(\r?\n|\Z)`, ByGroups(NameFunction, Text, NameNamespace, Text, KeywordReserved, Operator, LiteralNumber, Text), Push("headers")},
+ {`(GET|POST|PUT|DELETE|HEAD|OPTIONS|TRACE|PATCH|CONNECT)( +)([^ ]+)( +)(HTTP)(/)(1\.[01])(\r?\n|\Z)`, ByGroups(NameFunction, Text, NameNamespace, Text, KeywordReserved, Operator, LiteralNumber, Text), Push("headers")},
{`(HTTP)(/)(1\.[01])( +)(\d{3})( +)([^\r\n]+)(\r?\n|\Z)`, ByGroups(KeywordReserved, Operator, LiteralNumber, Text, LiteralNumber, Text, NameException, Text), Push("headers")},
},
"headers": {
@@ -91,7 +93,7 @@ func (d *httpBodyContentTyper) Tokenise(options *TokeniseOptions, text string) (
}
case token.Type == Generic && contentType != "":
{
- lexer := MatchMimeType(contentType)
+ lexer := internal.MatchMimeType(contentType)
// application/calendar+xml can be treated as application/xml
// if there's not a better match.
@@ -99,7 +101,7 @@ func (d *httpBodyContentTyper) Tokenise(options *TokeniseOptions, text string) (
slashPos := strings.Index(contentType, "/")
plusPos := strings.LastIndex(contentType, "+")
contentType = contentType[:slashPos+1] + contentType[plusPos+1:]
- lexer = MatchMimeType(contentType)
+ lexer = internal.MatchMimeType(contentType)
}
if lexer == nil {
diff --git a/vendor/github.com/alecthomas/chroma/lexers/hy.go b/vendor/github.com/alecthomas/chroma/lexers/h/hy.go
similarity index 97%
rename from vendor/github.com/alecthomas/chroma/lexers/hy.go
rename to vendor/github.com/alecthomas/chroma/lexers/h/hy.go
index ff1be32..17385e8 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/hy.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/h/hy.go
@@ -1,11 +1,12 @@
-package lexers
+package h
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Hy lexer.
-var Hy = Register(MustNewLexer(
+var Hy = internal.Register(MustNewLexer(
&Config{
Name: "Hy",
Aliases: []string{"hylang"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/idris.go b/vendor/github.com/alecthomas/chroma/lexers/i/idris.go
similarity index 96%
rename from vendor/github.com/alecthomas/chroma/lexers/idris.go
rename to vendor/github.com/alecthomas/chroma/lexers/i/idris.go
index 88828e5..ea25ca2 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/idris.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/i/idris.go
@@ -1,11 +1,12 @@
-package lexers
+package i
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Idris lexer.
-var Idris = Register(MustNewLexer(
+var Idris = internal.Register(MustNewLexer(
&Config{
Name: "Idris",
Aliases: []string{"idris", "idr"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/ini.go b/vendor/github.com/alecthomas/chroma/lexers/i/ini.go
similarity index 84%
rename from vendor/github.com/alecthomas/chroma/lexers/ini.go
rename to vendor/github.com/alecthomas/chroma/lexers/i/ini.go
index 5a02936..b242d3f 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/ini.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/i/ini.go
@@ -1,11 +1,12 @@
-package lexers
+package i
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Ini lexer.
-var Ini = Register(MustNewLexer(
+var Ini = internal.Register(MustNewLexer(
&Config{
Name: "INI",
Aliases: []string{"ini", "cfg", "dosini"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/io.go b/vendor/github.com/alecthomas/chroma/lexers/i/io.go
similarity index 91%
rename from vendor/github.com/alecthomas/chroma/lexers/io.go
rename to vendor/github.com/alecthomas/chroma/lexers/i/io.go
index 83bd3e1..840feea 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/io.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/i/io.go
@@ -1,11 +1,12 @@
-package lexers
+package i
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Io lexer.
-var Io = Register(MustNewLexer(
+var Io = internal.Register(MustNewLexer(
&Config{
Name: "Io",
Aliases: []string{"io"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/api.go b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go
similarity index 99%
rename from vendor/github.com/alecthomas/chroma/lexers/api.go
rename to vendor/github.com/alecthomas/chroma/lexers/internal/api.go
index 1dd7b37..65d4c60 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/api.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go
@@ -1,4 +1,4 @@
-package lexers
+package internal
import (
"path/filepath"
diff --git a/vendor/github.com/alecthomas/chroma/lexers/java.go b/vendor/github.com/alecthomas/chroma/lexers/j/java.go
similarity index 95%
rename from vendor/github.com/alecthomas/chroma/lexers/java.go
rename to vendor/github.com/alecthomas/chroma/lexers/j/java.go
index 6ee3d2a..c6b9a76 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/java.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/j/java.go
@@ -1,11 +1,12 @@
-package lexers
+package j
import (
. "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
)
// Java lexer.
-var Java = Register(MustNewLexer(
+var Java = internal.Register(MustNewLexer(
&Config{
Name: "Java",
Aliases: []string{"java"},
diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go
new file mode 100644
index 0000000..8301e41
--- /dev/null
+++ b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go
@@ -0,0 +1,72 @@
+package j
+
+import (
+ . "github.com/alecthomas/chroma" // nolint
+ "github.com/alecthomas/chroma/lexers/internal"
+)
+
+var JavascriptRules = Rules{
+ "commentsandwhitespace": {
+ {`\s+`, Text, nil},
+ {` |