Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 428045

Summary: Bad styling in acorn/acorn_loose.js
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed, ken_walker, Silenio_Quarti
Version: 5.0Flags: Silenio_Quarti: review+
ken_walker: review+
Target Milestone: 5.0 RC3   
Hardware: PC   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2014-02-12 16:28:08 EST
If you check out the acorn repo (https://github.com/marijnh/acorn) and view acorn_loose.js the styling is broken from about line 127 onward - the whole file shows up as a comment. 

Looks like the RegEx is causing the problem: 

/[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch)

from the '/*' chars onward.
Comment 1 Grant Gayed CLA 2014-02-19 14:28:13 EST
Proposed styling rules to add:

JS:
match: "/(?![\\s])(?:\\\\.|[^/])+/(?![/*])(?:[gimy]\\b)?",
name: "string.regexp.js"

Ruby:
match: "/(?![\\s])(?:\\\\.|[^/])+/(?:[ioxmuesn]\\b)?",
name: "string.regexp.ruby"
Comment 2 Grant Gayed CLA 2014-02-19 14:29:15 EST
(In reply to Grant Gayed from comment #1)

Actually I agreed to a small change in the JS one:

match: "/(?![\\s])(?:\\\\.|[^/])+/(?![/*])(?:[gim]\\b)?",
Comment 3 Grant Gayed CLA 2014-02-19 14:58:13 EST
Fixed > 20140219, commit http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cbac295ed67bf430e419d4acd6fe1fa3941a3907 .

Change also applied to the R5.0RC2_maintenance branch.