From: Ian Lance Taylor Date: Wed, 5 Feb 2020 23:34:50 +0000 (-0800) Subject: doc/go1.14: quote {{ and }} in text/template note X-Git-Tag: go1.14~10^2~2 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=dd0aa799eb;p=gostls13.git doc/go1.14: quote {{ and }} in text/template note Fixes #37070 Change-Id: I543957df264367e56c71a25bfaea5cf7935d438f Reviewed-on: https://go-review.googlesource.com/c/go/+/217979 Reviewed-by: Dmitri Shuralyov --- diff --git a/doc/go1.14.html b/doc/go1.14.html index b3423f8753..ec7f8e4f43 100644 --- a/doc/go1.14.html +++ b/doc/go1.14.html @@ -829,8 +829,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 - {{if (eq .F "a") or (eq .F "b")}}. - This should be written as {{if or (eq .F "a") (eq .F "b")}}. + {{"{{"}}if (eq .F "a") or (eq .F "b"){{"}}"}}. + This should be written as {{"{{"}}if or (eq .F "a") (eq .F "b"){{"}}"}}. The erroneous case never worked as expected, and will now be reported with an error can't give argument to non-function.