Open josharian opened 2 years ago
Yep, as you probably figured out, mismatched HTML tags are currently a problem as the parser is just a derivation from the regular HTML parser with additions.
Yep. :)
The thing I was surprised by here is that the ignore comments didn’t resolve the problem—I guess I expected them to cause the intervening contents to be completely skipped during the analysis.
For anyone else stumbling across this:
If you have a comment that you don't want prettier to format, do the following:
{{/* prettier-ignore-start */}}
{{/*
my multiline comment with
weird indentation
that prettier would destroy
*/}}
{{/* prettier-ignore-end */}}
The following will not work:
{{/* prettier-ignore */}}
{{/*
my multiline comment with
weird indentation
that prettier would destroy
*/}}
We have a series of templates that are used to render headers and footers piecemeal. They contain mismatch html tags, by design.
I figured we could work around this by using ignore comments. However, this doesn't work.
This yields: