Fix #263, document HTML comments & IE conditionals

This commit is contained in:
jesper-mortensen 2014-06-05 19:15:40 +02:00 committed by spf13
parent b2b7ba4243
commit 86c3de4be1

View file

@ -221,6 +221,13 @@ Could be rewritten as
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)