summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go')
-rw-r--r--vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
index b2cb9c4066..bd5fb9d9cc 100644
--- a/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
+++ b/vendor/github.com/alecthomas/chroma/lexers/c/cheetah.go
@@ -7,14 +7,18 @@ import (
)
// Cheetah lexer.
-var Cheetah = internal.Register(MustNewLexer(
+var Cheetah = internal.Register(MustNewLazyLexer(
&Config{
Name: "Cheetah",
Aliases: []string{"cheetah", "spitfire"},
Filenames: []string{"*.tmpl", "*.spt"},
MimeTypes: []string{"application/x-cheetah", "application/x-spitfire"},
},
- Rules{
+ cheetahRules,
+))
+
+func cheetahRules() Rules {
+ return Rules{
"root": {
{`(##[^\n]*)$`, ByGroups(Comment), nil},
{`#[*](.|\n)*?[*]#`, Comment, nil},
@@ -33,5 +37,5 @@ var Cheetah = internal.Register(MustNewLexer(
`, Other, nil},
{`\s+`, Text, nil},
},
- },
-))
+ }
+}