rtsao / csjs

:sparkles: Modular, scoped CSS with ES6
MIT License
576 stars 32 forks source link

Fix that allows missing space between extended class and opening bracket #41

Closed gersomvg closed 8 years ago

gersomvg commented 8 years ago

This syntax was not supported: .a extends .b{} because a space was missing between ‘.b’ and ‘{‘

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling adeaa161f16c462ff807e67430cc41ccd90885e3 on grsmvg:master into 3595f26918175598f8ed575a6e3331275376d3c4 on rtsao:master.

gersomvg commented 8 years ago

Haha, sorry for the pull request hell above. I thought: hey, let's also add a test case, but I didn't account for all those calculated hashes to change. Hopefully this last commit passes the checks successfully. I should have ran that Travis CI build on my local, but I didn't have any experience with running those builds yet. And although this is a minor fix, it is my first code contribution to an open source project, so please be patient 😎

rtsao commented 8 years ago

Thanks for the PR! Nice bugfix and thanks for adding a test case! No worries, that's what CI is for 😉

Looks like there's just a typo remaining in one of the test cases.

gersomvg commented 8 years ago

The remaining typo is actually the bug I found. When you do .a extends .b{ instead of .a extends .b { it will add the last character of the hash two times. So .class_HASH becomes .class_HASHH. The fact that this happened in the last commit before your comment shows that my regex fix is not working correctly. I will do another try..

gersomvg commented 8 years ago

It is not the regex. I will have a look at it after today... I don't mind diving deeper into the code.

gersomvg commented 8 years ago

Ready for merge!

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9b2dca35c5cfdb85e9644bd81713558008b99ade on grsmvg:master into 3595f26918175598f8ed575a6e3331275376d3c4 on rtsao:master.

rtsao commented 8 years ago

Ah, I see. Thanks again!