markup_fmt
markup_fmt copied to clipboard
Angular `@defer` block not formatted correctly
Angular supports the @defer syntax for lazy-loading components, but this plugin doesn't format these block correctly.
Expected:
@defer {
<p>Hello world</p>
}
Actual:
@defer {
<p>Hello world</p>
}
Side-note: Angular templates do not allow @ to be used outside of the control-flow syntax (it is a compiler error), meaning that if that character shows up in a template it is guaranteed to be template syntax and not general text. I only mention this as it could help with make this plugin a bit more future-proof by always parsing @block { ... } @other { ... } syntax as code-blocks, even if the specific keyword isn't known.