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 - Formatting broken in HTML editor with AngularJS tags and inline if
Summary: Formatting broken in HTML editor with AngularJS tags and inline if
Status: RESOLVED DUPLICATE of bug 251057
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-04 13:54 UTC by jburkhardt
Modified: 2015-08-04 13:59 UTC (History)
1 user (show)

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 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 ***