Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a wide range of fixes, basically to address issues with include as mentioned or discovered in #177
1. mj-attribute can be inside mj-body
mj-attribute
can be inside a mj-body with mj-include. Therefore the child elements can actually change the parent elements as well but because of attribute inheritance parents can also affect the children. Therefore we need 2 passes:Therefore we cannot reuse the binder anymore, which will reduce the performance a little bit.
2.
mj-attribute
affects all componentsBefore we have only handled binded attributes but in a few cases we get the child attributes from a component (see column or section).
This is also resolved because we had to store the binder now where we can solve that easily.
3. Child components of an include must be the child of the parent.
Because of parent-child inheritance we must just ignore that the mj-include even exists. This has been fixed by using the parent of the mj-include when parsing the included content.
I am not sure if mjml and mjml-body in an included file are also dummies that need to be flattened.
4. Simplify validators
We have the full component tree anyway.
5. Allow multiple heads