-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix breaking preprocessors' directives when parsing attributes #171
Conversation
I thing we have multiple related issues with entities and roundtrips and this looks like a very valid (but of course breaking) fix for this specific subset of situations described. Can you run the tests and tell jest to update the snapshots and also adopt any other failing test? Thx. |
The only thing that might be concerning is that with this change the following: <doc a1=""<&>'"></doc> will be serialized to <doc a1=""<&>'"/> (which is consistent with the already existing behavior for @brodybits what do you think? |
I wonder if we should just keep the quoted attribute value unchanged. |
I think we should be able to add this as an option to |
No more objections on my part. Thanks. |
Overview
The issue described above has been found during the development of the create-scandipwa-app.
Motivation
See the following code example. It is located in a PHP file and is valid: the corresponding function is called when the file is parsed. This has been tested using the Magento 2 framework, nonetheless, it should be possible to recreate this without the framework.
The code fragment above, when parsed back and forth, is expected to remain the same. But in fact, it turns into the following code.
Context
The used version is
0.4.0
The parsing process has been invoked as follows:
Description
This PR removes
<
from mandatory-to-replace token list for attribute parsing process.