question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[V2] /* */ Comments fail to parse when apostrophe is used

See original GitHub issue

I have valid comment that crash the css rendering when using apostrophe ' only once.

We had to correct /* don't do this */ => /* do not do this */

Version

2.0.0-5

Reproduction

http://www.webpackbin.com/NkoxEJM9G

Steps to reproduce

const HelloWorld = styled(HelloWorldUnStyled)`
  // will work
  border-left: 2px solid red;
  // ' <== this work but not when used with comment /**/'
  border-bottom: 2px solid blue;
  /* this comment is allowed because use 'not' only one apostrophe */
  border-top: 2px solid yellow;
  /* this comment can't be allowed because use only one apostrophe */
  border-bottom: 2px solid green;
`;

Expected Behavior

.vendor {
  border-left: 2px solid red;
  border-bottom: 2px solid blue;
  border-top: 2px solid yellow;
  border-bottom: 2px solid green;
}

Actual Behavior

.vendor {
  border-left: 2px solid red;
  border-bottom: 2px solid blue;
  border-top: 2px solid yellow;
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thysultancommented, Mar 3, 2017

@k15a should know more about this Re: webpack bundled dependencies

Until then maybe you can clone the repo and create a build locally and npm link.

0reactions
mxstbrcommented, Mar 3, 2017

Just to note, we do not recommend doing this and don’t officially support it 😉

Closing this as it’s fixed upstream, pushing a new version!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some Quotes and apostrophes don't parse correctly
When I load the feed through my browser I notice that some of the quotation marks and apostrophes are turned into " and...
Read more >
Apostrophe in comment confuses ADODB - MSDN - Microsoft
We just encountered an odd failure in ADODB. If it gets an SQL query with a comment embedded in it, and the comment...
Read more >
Formula Parse Errors in Google Sheets - YouTube
In this video, I cover formula parse errors in Google Sheets. I provide an overview of the different types of error messages that...
Read more >
13.2 Parsing HTML documents - HTML Standard
This error occurs if the parser encounters an attribute in a tag that already has an attribute with the same name. The parser...
Read more >
Parse error: syntax error, unexpected ' ' (T_STRING) i
This error usually happens because of a typo in your code such as a missing apostrophe/quotation mark, a missing space, or code that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found