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
Preserve case to support angular directive attributes #897
Comments
The parser follows the spec - and the spec normalizes attributes. This is the same behavior the browser shows.
The formatter only formats. It does not parse. It cannot infer what the original name was. Maybe its enough for you - then yes, but from the first paragraph I thought you already want to change the parsing perspective. |
Hi thanks for getting back to me so quickly. You are correct. I need to parse from the original so the MarkupFormatter will not work for me unless I take every possible directive and fix the case but not all directives are known in advance. I am assuming there are no extension points to the parser like there are for the MarkupFormatter? |
Yeah - at least not as with the |
Landed in |
We are trying to parse multiple angular html template files in order to quickly extract translatable
content. The directives for example "*ngIf", "*ngFor" are transformed to "*ngif" and "*ngfor" and then
the template is broken after save.
Would it be possible to extend or modify the parser so that the attribute case remains unchanged.
It seems that I might be able to do this using a CustomHtmlMarkupFormatter and overriding the
Attribute behavior.
Is this correct?
The other issue I have is if I do AddAttribute with a "*ngIf", the method complains that the * is a invalid
character. I have a hacky way to get around this but is there possibly a more elegant way to solve this?
The text was updated successfully, but these errors were encountered: