-
Notifications
You must be signed in to change notification settings - Fork 9
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
Does not work for a simple component #226
Comments
hmm, that does look strange. the whitespaces should have at least been collapsed to a single space. it almost looks like adding the addon does not have any effect at all. 🤔 |
Registering the plugin inside the @Turbo87 Do you mind if I raise a PR ? |
@boris-petrov do you mean |
@Turbo87 - well, I don't remember (I would guess I was talking about block: "{\"symbols\":[],\"statements\":[[5,[27,[26,1,\"BlockHead\"],[]],[true],null,[[\"default\"],[{\"statements\":[[1,1,0,0,\" \"],[1,0,0,0,[31,21,3,[27,[26,0,\"CallHead\"],[]],[1],null]],[1,1,0,0,\"\\n\"]],\"parameters\":[]}]]],[5,[27,[26,1,\"BlockHead\"],[]],[true],null,[[\"default\"],[{\"statements\":[[1,1,0,0,\" Hi there\\n\"]],\"parameters\":[]}]]]],\"hasEval\":false,\"upvars\":[\"log\",\"if\"]}", The plugin still doesn't work. |
@boris-petrov I think the issue is that you were using a colocated component template. mainmatter/ember-test-selectors#521 fixed a similar issue for ember-test-selectors and I expect this to be the correct solution here too. Can you verify if that solves the issue for you? |
@Turbo87 - that does seem to fix the issue, yes! |
While this seems to have fixed the issue with the ast plugins not being loaded in the correct order it is not removing leading whitespaces in colocated component templates (I have simplified the template): {
id: "qBBOrLXg",
block: "{\"symbols\":[],\"statements\":[[2,\" Hi there\\n\"]],\"hasEval\":false,\"upvars\":[]}",
meta: {
moduleName: "foo/components/some-component.hbs"
}
} |
Generates:
You can still see the spaces in the generated "machine code". Am I missing something? Isn't this supposed to remove these spaces by default with no configuration?
Happens on both Ember 3.16 and 3.17.
The text was updated successfully, but these errors were encountered: