From 6731d47f99d993522aa41990b46498d20ba646f1 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 23 Aug 2011 13:54:29 +1000 Subject: [PATCH] effective go: fix erroneous quoting of ampersands that cropped up R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4937047 --- doc/effective_go.html | 5 ++--- doc/effective_go.tmpl | 2 +- doc/progs/eff_qr.go | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/effective_go.html b/doc/effective_go.html index 5f27284aaf..6adf7e5558 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -2954,8 +2954,7 @@ const templateStr = ` </head> <body> {{if .}} -<img src="http://chart.apis.google.com/chart?chs=300x300&amp;cht=qr&amp;choe=UTF-8&amp;chl={{urlquery .}}" -/> +<img src="http://chart.apis.google.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl={{urlquery .}}" /> <br> {{html .}} <br> @@ -2994,7 +2993,7 @@ from data items passed to templ.Execute, in this case the form value. Within the template text (templateStr), double-brace-delimited pieces denote template actions. -The piece from the {{if .}} +The piece from {{if .}} to {{end}} executes only if the value of the current data item, called . (dot), is non-empty. That is, when the string is empty, this piece of the template is suppressed. diff --git a/doc/effective_go.tmpl b/doc/effective_go.tmpl index 6607894820..46d774ad4e 100644 --- a/doc/effective_go.tmpl +++ b/doc/effective_go.tmpl @@ -2884,7 +2884,7 @@ from data items passed to templ.Execute, in this case the form value. Within the template text (templateStr), double-brace-delimited pieces denote template actions. -The piece from the {{html "{{if .}}"}} +The piece from {{html "{{if .}}"}} to {{html "{{end}}"}} executes only if the value of the current data item, called . (dot), is non-empty. That is, when the string is empty, this piece of the template is suppressed. diff --git a/doc/progs/eff_qr.go b/doc/progs/eff_qr.go index fc92bd0efa..5d1fd38e06 100644 --- a/doc/progs/eff_qr.go +++ b/doc/progs/eff_qr.go @@ -31,8 +31,7 @@ const templateStr = ` {{if .}} - +
{{html .}}
-- 2.50.0