aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2020-02-05 19:24:55 -0500
committerDmitri Shuralyov <dmitshur@golang.org>2020-02-06 01:09:50 +0000
commitee3a3717aa16dabede5dc0385b05423e8fbce985 (patch)
treef57e5973abd325bc4a80552b9c9a97a9e198ee4e
parentdd0aa799ebbcb42cbc8d15aaa3edf905e8e1d83a (diff)
downloadgo-ee3a3717aa16dabede5dc0385b05423e8fbce985.tar.gz
go-ee3a3717aa16dabede5dc0385b05423e8fbce985.zip
doc/go1.14: disable text/template processing in HTML page
HTML pages served by the website have the option to opt-in to template processing, by including "Template: true" in the page metadata. This functionality is documented at https://github.com/golang/tools/blob/403f1254bdfd3da27c92a0e9e37dd180a9a82b3c/godoc/template.go#L5-L30. Historically, the Go 1 release notes have used template processing to a great extent, but release notes for all subsequent major Go releases have not. Since this feature is generally not used and not very well known, it tends to do more harm than good by making it possible for errors in the template to prevent the release notes from showing up at all. Disable this feature for Go 1.14 release notes and onwards. We can consider enabling it when there's a stronger need for it. Fixes #37072 Updates #37070 Change-Id: If93553d52df12544b46c4edcf3aa5eddc2a155ad Reviewed-on: https://go-review.googlesource.com/c/go/+/218058 Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--doc/go1.14.html7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/go1.14.html b/doc/go1.14.html
index ec7f8e4f43..4e7381b900 100644
--- a/doc/go1.14.html
+++ b/doc/go1.14.html
@@ -1,7 +1,6 @@
<!--{
"Title": "Go 1.14 Release Notes",
- "Path": "/doc/go1.14",
- "Template": true
+ "Path": "/doc/go1.14"
}-->
<!--
@@ -829,8 +828,8 @@ appropriately.)
The text/template package now correctly reports errors when a
parenthesized argument is used as a function.
This most commonly shows up in erroneous cases like
- <code>{{"{{"}}if (eq .F "a") or (eq .F "b"){{"}}"}}</code>.
- This should be written as <code>{{"{{"}}if or (eq .F "a") (eq .F "b"){{"}}"}}</code>.
+ <code>{{if (eq .F "a") or (eq .F "b")}}</code>.
+ This should be written as <code>{{if or (eq .F "a") (eq .F "b")}}</code>.
The erroneous case never worked as expected, and will now be
reported with an error <code>can't give argument to non-function</code>.
</p>