Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to read: Unclosed string (") #180

Closed
sandrodz opened this issue Dec 13, 2017 · 5 comments
Closed

Failed to read: Unclosed string (") #180

sandrodz opened this issue Dec 13, 2017 · 5 comments
Assignees
Labels

Comments

@sandrodz
Copy link

sandrodz commented Dec 13, 2017

Hello,

Fatal error: Uncaught Phug\ReaderException: Failed to read: Unclosed string (") encountered Near: Line: 221 Offset: 1 Position: 8417 in /www/at.dev/public/plugins/pugpress/vendor/phug/reader/src/Phug/Reader.php:913 Stack trace: #0 /www/at.dev/public/plugins/pugpress/vendor/phug/reader/src/Phug/Reader.php(795): Phug\Reader->throwException('Unclosed string...') #1 /www/at.dev/public/plugins/pugpress/vendor/phug/reader/src/Phug/Reader.php(835): Phug\Reader->readString(NULL, true) #2 /www/at.dev/public/plugins/pugpress/vendor/phug/lexer/src/Phug/Lexer/Scanner/AttributeScanner.php(88): Phug\Reader->readExpression(Array) #3 /www/at.dev/public/plugins/pugpress/vendor/phug/lexer/src/Phug/Lexer/Scanner/AttributeScanner.php(165): Phug\Lexer\Scanner\AttributeScanner->getAttributeValue(Object(Phug\Reader), Array) #4 /www/at.dev/public/plugins/pugpress/vendor/phug/lexer/src/Phug/Lexer/Scanner/AttributeScanner.php(273): Phug\Lexer\Scanner\AttributeScanner->scanParenthesesContent(Object(Phug\Lexer\State)) #5 /www/at.dev/public/plug in /www/at.dev/public/plugins/pugpress/vendor/phug/reader/src/Phug/Reader.php on line 913

I encountered an issue with the following code:

 style=isColored ? "color: #30619c" : "color: #262626")

screen shot 2017-12-13 at 7 49 46 pm

Thanks!

@kylekatarnls kylekatarnls self-assigned this Dec 13, 2017
@kylekatarnls
Copy link
Member

Confirmed, reproduced with just i(a=a ? ": " : "") strings containing colon following by space break the ternary. So until we fix it you work around by removing the space: color:#30619c

@kylekatarnls
Copy link
Member

Hi, I tagged a new version of the Phug lexer, so, it should now work if you run composer update

@sandrodz
Copy link
Author

@kylekatarnls thanks! but since you didn't tag new version of pug-php/pug I'm not getting a fix.

@kylekatarnls
Copy link
Member

kylekatarnls commented Dec 14, 2017

Why not? composer update should give you output like this: Updating phug/lexer (0.5.14 => 0.5.15)

@sandrodz
Copy link
Author

sorry, all good :) was updating a wrong project...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants