NesTeRDGIT / js-beautify-extension

MIT License
2 stars 0 forks source link

I have a problem with the format #6

Open ProfeJulianLasso opened 2 weeks ago

ProfeJulianLasso commented 2 weeks ago

The extension works great for formatting simple and easy things, but for formatting something like the following... it just doesn't work. Is it possible to fix that? Thanks in advance

<mat-table [dataSource]="dataSource()">
  @for (column of displayedColumns(); track $index) {
    <ng-container matColumnDef="{{ column }}">
      <mat-header-cell *matHeaderCellDef> {{ column }}</mat-header-cell>
      <mat-cell *matCellDef="let element">
        @if (isActionColumn(element, $index)) { @for (action of
      getArrayActions(element, $index); track $index) {
            <button mat-icon-button (click)="handleAction($event, element, action)" matTooltip="{{ action.tooltip }}">
              <mat-icon>{{ action.icon }}</mat-icon>
            </button>
          } } @else { {{ getElementColumn(element, $index) }} }
      </mat-cell>
    </ng-container>
  }
  <mat-header-row *matHeaderRowDef="displayedColumns()"></mat-header-row>
  <mat-row *matRowDef="let row; columns: displayedColumns()"></mat-row>
</mat-table>

<mat-paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]" (page)="handlePageEvent($event)">
</mat-paginator>
NesTeRDGIT commented 2 weeks ago

Formats code not extension. Formats js-beautify You need to contact them with this problem. You can check the error on their website: https://beautifier.io/ with Additional Settings (JSON): { "preserve_newlines": false, "brace_style": "preserve-inline", "indent_handlebars": true, "templating": ["angular"] }

NesTeRDGIT commented 2 weeks ago

image