UnclosedNodeError has some problem?
Closed this issue · 1 comments
fghhfg commented
command:
> var vash = require('vash');
> var tpl = vash.compile('<p>I am a @model.t!</p> @html.include("index.html", {})');
> out = tpl({ t: 'template' });
output error:
UnclosedNodeError: Problem while rendering template at line 1, character 23.
Original message: Found unclosed VashMarkupComment at template line 5, column 17
Context:
3 | <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
4 | <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
> 5 | <!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
6 |
7 | <meta charset="utf-8">
8 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
.
Context:
> 1 | <p>I am a @model.t!</p> @html.include("index.html", {})
at Parser.checkStack (C:\Users\user\tes\node_modules\vash\lib\parser.js:155:17)
at Object.exports.compile (C:\Users\user\tes\node_modules\vash\index.js:64:5)
at Object.vash.loadFile (C:\Users\user\tes\node_modules\vash\lib\helpers\layout.js:66:26)
at Helpers.helpers.include (C:\Users\user\tes\node_modules\vash\lib\helpers\layout.js:230:8)
at eval (eval at <anonymous> (C:\Users\user\tes\node_modules\vash\runtime.js:308:26), <anonymous>:40:33)
at linked (C:\Users\user\tes\node_modules\vash\runtime.js:348:14)
at repl:1:7
at REPLServer.defaultEval (repl.js:154:27)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
kirbysayshi commented
Just wanted to point out that the problem here is on line 5 the comment is <!-->
which is not a valid html comment as far as vash is concerned (and I don't think HTML either, but I'd have the check the spec).