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.
Summary: | Javascript interpretation error | ||
---|---|---|---|
Product: | javascript | Reporter: | maxevron |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | CC: | vriha |
Priority: | P3 | Keywords: | REGRESSION |
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Smarty template making use of HighCharts to produce graph |
Description
maxevron
2013-02-22 09:47:03 UTC
seems to be caused by spanning string over multiple lines, placing \ at the end helps (not sure about the regexp). Reassigning to JavaScript (In reply to comment #1) > seems to be caused by spanning string over multiple lines, placing \ at the end > helps (not sure about the regexp). Reassigning to JavaScript There is no string over multiple lines. The strings in this code are displayed with a carriage return in this ticket but there is no carriage return in the original source code. This is also true with: replace(/ /g, '')); which is in fact "replace(/ /g, ''));" in the source code. However, Netbeans shows an error at line: error: function(data) { In NB 7.2 was used different parser - Rhino. In NB 7.3 we use Nashorn parser which is more strict than Rhino. If it is still present attach the file as attachment so we can properly evaluate. Created attachment 137626 [details]
Smarty template making use of HighCharts to produce graph
I have a similar problem with javascript in a smarty template file where an error is reported that does not seem to be an error. The same file did not show an error in 7.2. snippet: title: { text: 'Comparison of Sales And Costs' }, xAxis: { categories: [ {foreach from=$results key=market item=res} '{ucwords(strtolower($market))}', {/foreach} ] }, yAxis: { min: 0, title: { text: 'Sales' }, stackLabels: { enabled: true, style: { fontWeight: 'bold', color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray' } } }, The error is indicated on the second and fourth line under the "yAxis: {" line: @err title: { 'Sales' @err }, Expected ; but found: The project runs as expected. I include the code as an attachment I am using: Product Version: NetBeans IDE 7.3 (Build 201306052037) Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03 Runtime: Java(TM) SE Runtime Environment 1.6.0_30-b12 System: Windows 7 version 6.1 running on x86; Cp1252; en_ZA (nb) RichardPilks: Please report it as a new issue( JavaScript/Editor, use [1]), your problem seems to be different than this one. Thank you [1] https://netbeans.org/bugzilla/enter_bug.cgi?product=javascript |