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 246931

Summary: Problems with JS formatting with smaty code in non-tpl file
Product: php Reporter: m1509001
Component: SmartyAssignee: Martin Fousek <marfous>
Status: REOPENED ---    
Severity: normal CC: vriha
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE 日志
sample file from reporter
screenshot

Description m1509001 2014-09-09 02:52:09 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.8.0_05
Runtime = Java HotSpot(TM) Client VM 25.5-b02
Comment 1 m1509001 2014-09-09 02:52:26 UTC
Created attachment 149075 [details]
IDE 日志
Comment 2 Vladimir Riha 2014-09-09 06:58:10 UTC
Could you please report in English? Based on translator, it seems you have a problem with jQuery formatting. Could you please attach sample file to reproduce the issue and step by step instruction to see what is wrong? It is hard to identify the problem without these information. Simply reopen the issue then.


Thank you in advance
Comment 3 Vladimir Riha 2014-09-22 14:52:04 UTC
Created attachment 149421 [details]
sample file from reporter

Here's a simplified sample file from reporter. The problem is JavaScript code contains {#$maxnum#} - some framework directive.

Based on the screenshot from reporter (to be attached), the HTML file extension is set to be treated as text/x-tpl mimetype. The directive is similar to Smarty framework so if one:
 - sets HTML to be treated as text/x-tpl
 - sets Smarty delimiters to {# and #}
 => the {#$maxnum#} is correctly highlighted but formatting still fails. It works in tpl file though. 

Reassigning to Smarty for further evaluation (please reassign back if I'm wrong). Thank you
Comment 4 Vladimir Riha 2014-09-22 14:53:56 UTC
Created attachment 149423 [details]
screenshot