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

-O in JSON format throws error #54

Open
Austneal opened this issue Mar 8, 2017 · 0 comments
Open

-O in JSON format throws error #54

Austneal opened this issue Mar 8, 2017 · 0 comments

Comments

@Austneal
Copy link

Austneal commented Mar 8, 2017

On Windows, using this command

pug -O '{"foo": "bar"}' index.pug

with this file

h1 Main Page
p This is the main page.
p= foo

throws the following error:

('{foo:)
 ^^^^^^^

SyntaxError: Unexpected token ILLEGAL
    at parseObj (c:\node\node_modules\pug-cli\index.js:101:29)
    at Object.<anonymous> (c:\node\node_modules\pug-cli\index.js:81:13)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3

Using -O with the "javascript format" works correctly.

EDIT: It seems to be an issue with the quotes. pug -O "{'foo': 'bar'}" index.pug This works correctly.

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

No branches or pull requests

1 participant