mirror of
https://github.com/alecthomas/chroma.git
synced 2025-03-19 21:10:15 +02:00
Fix lint.
This commit is contained in:
parent
575caac139
commit
3626d89d3e
@ -1,4 +1,4 @@
|
|||||||
package s;
|
package s
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/alecthomas/chroma" // nolint
|
. "github.com/alecthomas/chroma" // nolint
|
||||||
@ -10,17 +10,17 @@ import (
|
|||||||
// Svelte lexer.
|
// Svelte lexer.
|
||||||
var Svelte = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
|
var Svelte = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
|
||||||
&Config{
|
&Config{
|
||||||
Name: "Svelte",
|
Name: "Svelte",
|
||||||
Aliases: []string{"svelte"},
|
Aliases: []string{"svelte"},
|
||||||
Filenames: []string{"*.svelte"},
|
Filenames: []string{"*.svelte"},
|
||||||
MimeTypes: []string{"application/x-svelte"},
|
MimeTypes: []string{"application/x-svelte"},
|
||||||
DotAll: true,
|
DotAll: true,
|
||||||
},
|
},
|
||||||
svelteRules,
|
svelteRules,
|
||||||
)))
|
)))
|
||||||
|
|
||||||
func svelteRules() Rules {
|
func svelteRules() Rules {
|
||||||
return Rules {
|
return Rules{
|
||||||
"root": {
|
"root": {
|
||||||
{`(<\s*script\s*lang\s*=\s*['"](?:ts|typescript)['"]\s*>)(.+?)(<\s*/\s*script\s*>)`, ByGroups(Other, Using(t.TypeScript), Other), nil},
|
{`(<\s*script\s*lang\s*=\s*['"](?:ts|typescript)['"]\s*>)(.+?)(<\s*/\s*script\s*>)`, ByGroups(Other, Using(t.TypeScript), Other), nil},
|
||||||
{`\{`, Punctuation, Push("templates")},
|
{`\{`, Punctuation, Push("templates")},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user