In jade, I want to put in a html tag conditional as per this method, which puts in
In version 1.0.0
(released on 22 December 2013) Jade does not parse comments content any more and support for the IE conditional comments has been removed (//if lt IE 7
will not work as in version 0.35.0
and below).
The new approach is to use well formatted IE conditional comments. So in order to generate above IE conditional comments, Jade template will have to be as follows:
html(class="")
...
Note that the first four html
elements are well formatted HTML elements. The last one uses Jade syntax. Also the last comment has to be indented.
With Jade version 1.0.0 and above it is safe to use HTML comments as Jade will ignore any line beginning with <
character.
You can also visit this post on IE Conditional Comments in Jade which talks about difference between Jade version 0.35.0
and 1.0.0
. It also shows alternative approach of using Jade mixins mechanism for conditional comments.