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

Parsing breaks on inline styles #29

Open
cespare opened this issue Mar 11, 2015 · 2 comments
Open

Parsing breaks on inline styles #29

cespare opened this issue Mar 11, 2015 · 2 comments
Labels

Comments

@cespare
Copy link

cespare commented Mar 11, 2015

Input file:

<style>
  body { color: green }
</style>

Result:

Error: Parse error on line 2:
  body { color: green }
-------^
Expecting 'EOF', 'ESCAPED_LEFT', 'ESCAPED_RIGHT', 'CONTENT', '{{', '{{{', got 'INVALID'
  at Object.parseError (<anonymous>:45:15)
  at Object.parse (<anonymous>:110:22)
  at Compiler.makeVariableStatements (/usr/lib/node_modules/domly-liftoff/index.js:292:29)
  at Compiler.setTextContent (/usr/lib/node_modules/domly-liftoff/index.js:243:25)
  at Compiler.buildFunctionBody (/usr/lib/node_modules/domly-liftoff/index.js:632:18)
  at Compiler.precompile (/usr/lib/node_modules/domly-liftoff/index.js:705:8)
  at Object.module.exports.precompile (/usr/lib/node_modules/domly-liftoff/index.js:770:21)
  at Object.<anonymous> (/home/caleb/w/liftoff/admarkup/domlify.coffee:13:13, <js>:17:21)
  at Object.<anonymous> (/home/caleb/w/liftoff/admarkup/domlify.coffee:3:1, <js>:21:4)
  at Module._compile (module.js:456:26)

Is this supposed to work?

@lazd
Copy link
Owner

lazd commented Mar 11, 2015

Yeah, I think it ought to as we should be looking for {{ and }} not { and }.

For now, you can escape each { and } with \{ and \}. See the Style tag.html test fixture.

@cespare
Copy link
Author

cespare commented Mar 11, 2015

Thanks!

@lazd lazd added the bug label Dec 6, 2015
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