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 254127

Summary: Formatting broken in HTML editor with AngularJS tags and inline if
Product: web Reporter: jburkhardt
Component: AngularJSAssignee: Roman Svitanic <rsvitanic>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ppisl
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description jburkhardt 2015-08-04 13:54:39 UTC
If I create an element with an AngularJS tag and use an inline if statement inside of that tag, the formatting is broken on the "else" choice. 
Example:
<i ng-class="true ? 'icon-up-arrow' : 'icon-down-arrow'"></i>
Results after applying formatting:
<i ng-class="true ? 'icon-up-arrow' : 'icon - down - arrow'"></i>

The HTML editor views 'icon-up-arrow' correctly as a string, but it views 'icon-down-arrow' as Javascript, and runs it through the binary operator format style and spaces are inserted around the - signs. A workaround of some sort is to go into Javascript formatting and turn off spaces for binary operators (not ideal if you are working with both HTML & JS).
Comment 1 Roman Svitanic 2015-08-04 13:59:00 UTC

*** This bug has been marked as a duplicate of bug 251057 ***