-
Notifications
You must be signed in to change notification settings - Fork 308
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
Multi-lined styleUrls
seems to break tests.
#136
Comments
That's a regex issue. Would you mind sending a PR with this fix an test case? :) |
Getting the same error on templateUrl. |
@Naooki can you create an issue with the reproducible example? |
@thymikee Sorry, my problem was that I've forgotten to change preprocessor in the transform section of jest config. It was ts-jest, instead of jest-preset-angular preprocessor. Interesting though that I've got the same error mentioned here. |
I had the same issue and the commit referenced fixed it. Any eta on that getting pushed out to NPM? Pulling from the github repo for now. |
@jeremyfry unfortunately you have to wait for the fix patch to release. |
published v5.2.2 |
@thymikee Thanks! I'll try to put in a new pr this week as well. I'm cleaning up a codebase that's a bit of a mess and it looks like this regex fails on some of the messier formats for some reason. I just forced some formatting for now, but I'll try to make it more robust. |
Awesome! |
Components that are declared like this:
break the regex of the preprocessor, resulting in:
Putting the
styleUrls
all on one line fixes this issue.Seems to me that the regex could just be
styleUrls:\s*\[[^\]]*\]
? Unless I'm really missing something. Let me know and I will make a PR.The text was updated successfully, but these errors were encountered: