Skip to content

Commit

Permalink
Human readable name for Go template lexers.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Mar 18, 2018
1 parent f315512 commit b21a6da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lexers/g/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,17 @@ var goTemplateRules = Rules{
}

var GoHTMLTemplate = internal.Register(DelegatingLexer(h.HTML, MustNewLexer(
&Config{Name: "go-html-template"},
&Config{
Name: "Go HTML Template",
Aliases: []string{"go-html-template"},
},
goTemplateRules,
)))

var GoTextTemplate = internal.Register(MustNewLexer(
&Config{Name: "go-text-template"},
&Config{
Name: "Go Text Template",
Aliases: []string{"go-text-template"},
},
goTemplateRules,
))

0 comments on commit b21a6da

Please sign in to comment.