Skip to content

Commit dc9d41d

Browse files
committed
fix go comment highlighting
1 parent 77d5bb0 commit dc9d41d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/theme/prism/custom/prism-go-template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const lang = "go-template"
44
Prism.languages[lang] = {
55
// Go template comments {{/* ... */}}
66
"go-template-comment": {
7-
pattern: /\{\{\/\*[\s\S]*?\*\/\}\}/,
7+
pattern: /\{\{[\s\-]*\/\*[\s\S]*?\*\/[\s\-]*\}\}/,
88
greedy: true,
99
alias: "comment",
1010
inside: {
@@ -15,7 +15,7 @@ const lang = "go-template"
1515

1616
// Regular Go template expressions {{ ... }}
1717
"go-template-variable": {
18-
pattern: /\{\{(?!\/\*)[\s\S]+?\}\}/,
18+
pattern: /\{\{[\s\-]*(?!\/\*)[\s\S]+?[\s\-]*\}\}/,
1919
greedy: true,
2020
alias: "variable",
2121
inside: {

0 commit comments

Comments
 (0)