ref: 86c3de4be12b08cff9a6ac39d8a4f57e5ac77ba9
parent: b2b7ba42432775ba29ec859b3d43fc63abeec310
author: jesper-mortensen <[email protected]>
date: Thu Jun 5 15:15:40 EDT 2014
Fix #263, document HTML comments & IE conditionals
--- a/docs/content/templates/go-templates.md
+++ b/docs/content/templates/go-templates.md
@@ -221,6 +221,13 @@
Stuff Here
{{ end }}
+### Internet Explorer conditional comments using Pipes
+
+By default Go Templates remove HTML comments from output. This has the unfortunate side effect of removing Internet Explorer conditional comments. As a workaround, use something like this:
+
+ {{ "<!--[if lt IE 9]>" | safeHtml }}
+ <script src="html5shiv.js"></script>
+ {{ "<![endif]-->" | safeHtml }}
## Context (aka. the dot)