This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 259110 - Auto format inserts extra spaces in angular code
Summary: Auto format inserts extra spaces in angular code
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal with 2 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 13:01 UTC by usernamex12j1532jk
Modified: 2016-09-14 13:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description usernamex12j1532jk 2016-05-03 13:01:41 UTC
Create an html file with this content

<select ng-options="equipmentGroup.id as equipmentGroup.name | uppercase for equipmentGroup in equipmentGroups">
</select>

Then apply the auto format (alt-shift-f). The formatter inserts an extra space after the pipe and will insert another space every time the code is reformatted, eventually looking like this or worse:

<select ng-options="equipmentGroup.id as equipmentGroup.name |                uppercase for equipmentGroup in equipmentGroups">
</select>

Expected result is to reformat once and put one space before and after pipe, then no further changes.
Comment 1 OlivierLevrey 2016-09-14 13:19:15 UTC
Same happened for me with the following code:

<select data-ng-options="person as (person.firstName + ' ' + person.lastName) for person in persons"></select>

Spaces are added after the two '+' characters every time I autoformat.