using html entities via content — Octal literal in strict mode
See original GitHub issueVersion
1.0.5
Reproduction
http://www.webpackbin.com/VyBp2UlWz
Steps to reproduce
add &:after { content: '\2192'; }
inside any line element
Expected Behavior
should output html arrow / entity, etc. →
Actual Behavior
parse error “Octal literal in strict mode …”
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Octal literals are not allowed in strict mode - Stack Overflow
Uncaught SyntaxError: Octal literals are not allowed in strict mode. I know codes in styles: [``] needs to be CSS codes. And I...
Read more >SyntaxError: "0"-prefixed octal literals and octal escape seq ...
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. The standardized syntax uses a leading ...
Read more >Chapter 1, The JavaScript Not-So-Simple Building Blocks
You can quickly tell the difference between a primitive and an object instance when you compare an object instance to a literal value...
Read more >Embedding numbers into strings in strict mode - SitePoint
Hi all, I am trying to assign a file path to a variable in Typescript while in strict mode. The path has numbers...
Read more >All You Need to Know About JavaScript from ... - Morioh
In modern environments, with strict mode enabled, you will get an error. ... literals is an array containing the template literal content tokenized...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just need to escape the backslash. This works perfectly fine:
That’s why we have a linter. 😉
Ah what a pain! I don’t think there’s anything we can do about this, that’s just a fundamental difference from JS strings and CSS text. But it means you can’t quite “just copy-paste CSS!” which is what I was hoping for.