markup_fmt icon indicating copy to clipboard operation
markup_fmt copied to clipboard

Angular `@defer` block not formatted correctly

Open lizclipse opened this issue 6 months ago • 0 comments

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.

lizclipse avatar Jun 06 '25 11:06 lizclipse