Closed berkus closed 8 years ago
<meta<?php $__value = "viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"; if (!\Tale\Jade\Compiler::isNullOrFalse($__value)) echo ' name='.\Tale\Jade\Compiler::buildValue($__value, '"', true); unset($__value);?>></meta>
<meta<?php $__value = "X-UA-Compatible" content="chrome=1"; if (!\Tale\Jade\Compiler::isNullOrFalse($__value)) echo ' http-equiv='.\Tale\Jade\Compiler::buildValue($__value, '"', true); unset($__value);?>></meta>
<link<?php $__value = "shortcut icon" href="/favicon.ico"; if (!\Tale\Jade\Compiler::isNullOrFalse($__value)) echo ' rel='.\Tale\Jade\Compiler::buildValue($__value, '"', true); unset($__value);?>>
<link<?php $__value = "stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600"; if (!\Tale\Jade\Compiler::isNullOrFalse($__value)) echo ' rel='.\Tale\Jade\Compiler::buildValue($__value, '"', true); unset($__value);?>>
<link<?php $__value = "stylesheet" href="/style.css"; if (!\Tale\Jade\Compiler::isNullOrFalse($__value)) echo ' rel='.\Tale\Jade\Compiler::buildValue($__value, '"', true); unset($__value);?>>
Notice how rel=
part got chopped and the string has invalid quoting making it unparsable.
Sorry, seems to be my bad - according to this link http://stackoverflow.com/questions/22653420/inserting-meta-using-jade-template-engine i need to add some commas there.
Dude, that's actually really interesting.
The first snippets gets parsed correctly in the official Node.js. I didn't even know that you can also separate arguments with a simple space.
I will implement this ASAP.
Cheers! I wondered what's wrong, but apparently in Node it can eat it without commas.
Just a small update on this, I'm at it (It should actually be a really small change in the lexer), but I'm in holidays for like 3 more weeks and I'll push it after that.
It will surely be supported in the future!
It's in now.
You can mix attribute separators, it's either any kind of whitespace (space, tab, newline) or a comma.
I also added a test to keep your issue tracked and working correctly. https://github.com/Talesoft/tale-jade/blob/master/Test/AttributeTest.php#L159
Section like this is parsed correctly by Node jade, but in TaleJade it turns into a mess that fails to even compile. Is it me doing something wrong or Node's jade is not fully compatible?