Skip to content

Commit

Permalink
Fix #263, document HTML comments & IE conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-mortensen authored and spf13 committed Jun 30, 2014
1 parent b2b7ba4 commit 86c3de4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/content/templates/go-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 86c3de4

Please sign in to comment.