New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658803 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

DevTools: syntax highlight .es files as JavaScript

Reported by christop...@yahoo.com, Oct 24 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
1. Open a local file with the suffix '.es' in the devtools.
2. View the code in the file.
3. 

What is the expected behavior?
It should be syntax-highlighted, or there should be an easy option to map file type suffixes to language types for effective and flexible syntax highlighting.

What went wrong?
The code in the file was not syntax highlighted.

Did this work before? No 

Chrome version: 53.0.2785.143  Channel: n/a
OS Version: OS X 10.12.1
Flash Version: Shockwave Flash 23.0 r0
 
For example, '.es' for ES6 JavaScript.

Comment 2 by hdodda@chromium.org, Oct 25 2016

Cc: hdodda@chromium.org
Labels: Needs-Feedback
@christopherbalz -- could you please provide us a sample test case or URL where you are facing the issue , so that it helps us in triaging the issue better.

Thanks !
Labels: -Type-Bug -Needs-Feedback -OS-Mac OS-All Type-Feature
Create a file named something.es and put the following inside -
function d()
{
 alert('The script ran.');
}
for (let i = 0; i < 1; i++)
{
 d();
}

Open the Developer Tools, go to the Sources panel, right click on the left navigation pane and click on Add folder to workspace, select the folder that has the something.es file you created earlier. Find something.es in the pane, double click on it and see the it shows the code without syntax highlighting (all of the content has the same font color).
Components: -Platform>DevTools Platform>DevTools>Authoring
Note that if you load a page that loads something.es as a script (<script src=something.es></script>), syntax highlighting does work, so it is a workspace issue.
Owner: einbinder@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: DevTools: syntax highlight .es files as JavaScript (was: Need a way to map file suffix to language type for syntax highlighting)
What are the other extensions you use for javascript?

Comment 6 by phistuck@gmail.com, Oct 25 2016

I think mapping options should be provided in addition to good defaults (js, jsm, jsx perhaps, es).
Labels: Hotlist-Polish
Status: Archived (was: Assigned)
Bulk closing low-priority issues with no activity. Please re-file and refer to the closed issue if it's essential to fix.

Sign in to add a comment