Fastfix for previous two commits (sorry) and chroma update.
Well, doing "git add ." not from repository's root is a bad idea. Updated chroma dependency, added more languages to syntax highlighting.
This commit is contained in:
14
vendor/github.com/alecthomas/chroma/lexers/s/sass.go
generated
vendored
14
vendor/github.com/alecthomas/chroma/lexers/s/sass.go
generated
vendored
@@ -15,13 +15,13 @@ var Sass = internal.Register(MustNewLexer(
|
||||
CaseInsensitive: true,
|
||||
},
|
||||
Rules{
|
||||
// "root": {
|
||||
// },
|
||||
"root": {
|
||||
{`[ \t]*\n`, Text, nil},
|
||||
// { `[ \t]*`, ?? <function _indentation at 0x10fcaf1e0> ??, nil },
|
||||
},
|
||||
"content": {
|
||||
// { `//[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x10fcaf378> ??, Push("root") },
|
||||
// { `/\*[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x10fcaf400> ??, Push("root") },
|
||||
// { `[ \t]*`, ?? <function _indentation at 0x106932e18> ??, nil },
|
||||
// { `//[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x106936048> ??, Push("root") },
|
||||
// { `/\*[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x1069360d0> ??, Push("root") },
|
||||
{`@import`, Keyword, Push("import")},
|
||||
{`@for`, Keyword, Push("for")},
|
||||
{`@(debug|warn|if|while)`, Keyword, Push("value")},
|
||||
@@ -112,9 +112,9 @@ var Sass = internal.Register(MustNewLexer(
|
||||
{`"`, LiteralStringDouble, Pop(1)},
|
||||
},
|
||||
"string-single": {
|
||||
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringDouble, nil},
|
||||
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringSingle, nil},
|
||||
{`#\{`, LiteralStringInterpol, Push("interpolation")},
|
||||
{`'`, LiteralStringDouble, Pop(1)},
|
||||
{`'`, LiteralStringSingle, Pop(1)},
|
||||
},
|
||||
"string-url": {
|
||||
{`(\\#|#(?=[^\n{])|[^\n#)])+`, LiteralStringOther, nil},
|
||||
|
4
vendor/github.com/alecthomas/chroma/lexers/s/smarty.go
generated
vendored
4
vendor/github.com/alecthomas/chroma/lexers/s/smarty.go
generated
vendored
@@ -1,9 +1,9 @@
|
||||
package s
|
||||
|
||||
import (
|
||||
. "github.com/alecthomas/chroma" // nolint
|
||||
. "github.com/alecthomas/chroma" // nolint
|
||||
. "github.com/alecthomas/chroma/lexers/circular" // nolint
|
||||
"github.com/alecthomas/chroma/lexers/internal"
|
||||
. "github.com/alecthomas/chroma/lexers/p" // nolint
|
||||
)
|
||||
|
||||
// Smarty lexer.
|
||||
|
28
vendor/github.com/alecthomas/chroma/lexers/s/systemd.go
generated
vendored
Normal file
28
vendor/github.com/alecthomas/chroma/lexers/s/systemd.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package s
|
||||
|
||||
import (
|
||||
. "github.com/alecthomas/chroma" // nolint
|
||||
"github.com/alecthomas/chroma/lexers/internal"
|
||||
)
|
||||
|
||||
var SYSTEMD = internal.Register(MustNewLexer(
|
||||
&Config{
|
||||
Name: "SYSTEMD",
|
||||
Aliases: []string{"systemd"},
|
||||
Filenames: []string{"*.service"},
|
||||
MimeTypes: []string{"text/plain"},
|
||||
},
|
||||
Rules{
|
||||
"root": {
|
||||
{`\s+`, Text, nil},
|
||||
{`[;#].*`, Comment, nil},
|
||||
{`\[.*?\]$`, Keyword, nil},
|
||||
{`(.*?)(=)(.*)(\\\n)`, ByGroups(NameAttribute, Operator, LiteralString, Text), Push("continuation")},
|
||||
{`(.*?)(=)(.*)`, ByGroups(NameAttribute, Operator, LiteralString), nil},
|
||||
},
|
||||
"continuation": {
|
||||
{`(.*?)(\\\n)`, ByGroups(LiteralString, Text), nil},
|
||||
{`(.*)`, LiteralString, Pop(1)},
|
||||
},
|
||||
},
|
||||
))
|
Reference in New Issue
Block a user