<!--[if lt IE 9]><script src="ie8-scripts.js"></script><![endif]-->
converts into
//if lt IE 9
script(src='ie8-scripts.js')
which converts into
<!--if lt IE 9script(src='ie8-scripts.js')-->
I think it just needs to literally output the html as is if it detects <!--[if and then ends the literal output when it finds <![endif]-->
<!--[if lt IE 9]><script src="ie8-scripts.js"></script><![endif]-->converts into
which converts into
<!--if lt IE 9script(src='ie8-scripts.js')-->I think it just needs to literally output the html as is if it detects
<!--[ifand then ends the literal output when it finds<![endif]-->