summaryrefslogtreecommitdiff
path: root/vendor/github.com/alecthomas/chroma/v2/lexers/go.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/alecthomas/chroma/v2/lexers/go.go')
-rw-r--r--vendor/github.com/alecthomas/chroma/v2/lexers/go.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/go.go b/vendor/github.com/alecthomas/chroma/v2/lexers/go.go
index 60b1f71..c6123b9 100644
--- a/vendor/github.com/alecthomas/chroma/v2/lexers/go.go
+++ b/vendor/github.com/alecthomas/chroma/v2/lexers/go.go
@@ -28,10 +28,10 @@ var Go = Register(MustNewLexer(
func goRules() Rules {
return Rules{
"root": {
- {`\n`, Text, nil},
- {`\s+`, Text, nil},
- {`\\\n`, Text, nil},
- {`//[^\n\r]*`, CommentSingle, nil},
+ {`\n`, TextWhitespace, nil},
+ {`\s+`, TextWhitespace, nil},
+ {`//[^\s][^\n\r]*`, CommentPreproc, nil},
+ {`//\s+[^\n\r]*`, CommentSingle, nil},
{`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil},
{`(import|package)\b`, KeywordNamespace, nil},
{`(var|func|struct|map|chan|type|interface|const)\b`, KeywordDeclaration, nil},