-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Bug] Cli push doesn't recognize key and tags in the translate pipe when there are variables defined using pipes #177
Comments
Hello @mgrilec and thank you for referring this parsing issue. The truth is that the Angular pipe lacks of good parsing, when no references to variables are in place, the tags are recognized and pushed, but when in the parameters are references to variables, we cannot understand using a simple parsing, and thus the parameters are ignored (all). I try to minimize the side effects in this PR. But in this case, the parser cannot extract any value for the NOTE: For the translate pipe parameters, is better to use quotes for delimiting the string values, otherwise the results are unexpected. Let's wait for the reviews and when deployed, give it a try. |
Fix for issue #177 and improve Angular parser tests
My example still doesn't work.
It's not possible to use double quotes in cases where the pipe has to be used inside attributes.
What do you suggest to use there? |
Hello @mgrilec I will look into it,, I think the regex for these specific syntax has some problem. I'll try to find a fix ASAP. Thank you for the feedback! |
@mgrilec We've released the version 5.1.1. Please feel free to check if the issue is fixed for you. |
@mgrilec Have you tested this one with the latest release? |
Closing this one, as is the same as #183 . If something come up, we can reopen it. |
Current Behavior
The cli push doesn't recognize the key and tags.
Expected Behavior
Cli push should recognize key and tags.
Steps to Reproduce
Have somewhere in your HTML
Possible Solution
??
Possible Implementation
The translate params are read by passing the whole params object to
Function(`"use strict";return (${obj})`)();
, which doesn't parse well. The key, tags and all other predefined keys should be parsed using a regex with a capturing group. Other params are not useful for the parser anyway.The text was updated successfully, but these errors were encountered: