Closed cyrusdavid closed 11 years ago
$html ="!!! 5
html
title Hello World";
exit(var_dump(($jade->render($html)));
The same happens.
Hello,
Thanks for your report, i did several tests and this is not a bug. Jade does not expect any indent after the doctype declaration.
Your template is also invalid with native jade.
The fallowing code works
$parser = new \Jade\Parser(new \Jade\Lexer());
$dumper = new \Jade\Dumper();
$jade = new \Jade\Jade($parser, $dumper);
$html = <<<EOF
!!! 5
html
EOF;
exit(var_dump($jade->render($html)));
I admit the error message should be smarter (like the js one)
Error: test.jade:2
1| !!! 5
> 2| html
3| title Hello
4|
unexpected token "indent"
Oh, haha. Sorry about that.
No problem, your issue pointed a serious lack of information for such error.
btw, can I pass an option/argument somewhere to enable/disable pretty-print?
Could you open another issue with some examples of what you want to do please ?