Parsing breaks on inline styles
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 54
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the inline <style> example and trace the failure through Compiler.makeVariableStatements, Compiler.setTextContent, and Compiler.buildFunctionBody in the stack trace. Inspect admarkup/domlify.coffee and the parser entry points to determine how style text is handled; done means the example parses without the reported INVALID-token error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100