aboutsummaryrefslogtreecommitdiff
path: root/src/html/template/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/template/context.go')
-rw-r--r--src/html/template/context.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/html/template/context.go b/src/html/template/context.go
index c28fb0c5ea..e07a0c4a02 100644
--- a/src/html/template/context.go
+++ b/src/html/template/context.go
@@ -128,6 +128,10 @@ const (
stateJSBlockCmt
// stateJSLineCmt occurs inside a JavaScript // line comment.
stateJSLineCmt
+ // stateJSHTMLOpenCmt occurs inside a JavaScript <!-- HTML-like comment.
+ stateJSHTMLOpenCmt
+ // stateJSHTMLCloseCmt occurs inside a JavaScript --> HTML-like comment.
+ stateJSHTMLCloseCmt
// stateCSS occurs inside a <style> element or style attribute.
stateCSS
// stateCSSDqStr occurs inside a CSS double quoted string.
@@ -155,7 +159,7 @@ const (
// authors & maintainers, not for end-users or machines.
func isComment(s state) bool {
switch s {
- case stateHTMLCmt, stateJSBlockCmt, stateJSLineCmt, stateCSSBlockCmt, stateCSSLineCmt:
+ case stateHTMLCmt, stateJSBlockCmt, stateJSLineCmt, stateJSHTMLOpenCmt, stateJSHTMLCloseCmt, stateCSSBlockCmt, stateCSSLineCmt:
return true
}
return false