New issue
Advanced search Search tips

Issue 667578 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Chrome Dev Tools Fails to Syntax Highlight Properly

Reported by bill.m...@gmail.com, Nov 22 2016

Issue description

Chrome Version       : 54.0.2840.98 (64-bit) and 57.0.2927.0 (64-bit)
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: FAIL
    Firefox: FAIL

What steps will reproduce the problem?
(1) Save https://gist.githubusercontent.com/llimllib/931b448c9ec5cf7477959d9022210b18/raw/58bc287f8e9ad2b13c15c362fdd109af7aaa97d8/lighthouse.html to your hard drive
(2) Run a web server and open that file
(3) Note that The syntax highlighting fails on line 1699, despite it being valid javascript. Screenshot: https://cloud.githubusercontent.com/assets/7150/20494536/640db97e-afeb-11e6-87d7-1294bd115ae4.png

What is the expected result?

The file is shown in the developer console with the correct syntax highlighting

What happens instead?

The file is shown in the developer console with incorrect syntax highlighting

 
640db97e-afeb-11e6-87d7-1294bd115ae4.png
90.4 KB View Download

Comment 1 by ajha@chromium.org, Nov 22 2016

Labels: M-57

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

Labels: TE-NeedsTriageHelp

Comment 3 by ajha@chromium.org, Nov 29 2016

Cc: ajha@chromium.org
Components: Platform>DevTools
Labels: -TE-NeedsTriageHelp OS-Linux OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on the latest canary(57.0.2936.0) on Windows-10, Mac OS 10.11.6 and Linux Ubuntu 14.04(57.0.2929.0). This is non-regression issue seen the similar behavior on older chrome version: 30.0.1549.0 as well.

Marking this as Untriaged for more inputs on this.
667578.png
182 KB View Download
Owner: einbinder@chromium.org
Status: Assigned (was: Untriaged)
The same is true for template strings in Version 57.0.2957.0 (Official Build) canary (64-bit).

I *also* observed incorrect parenthesis matching, possibly related. Note the opening ( is incorrectly matched to a closing } in the attached screenshot, as well a the transition from syntax detection to plain-text.

Please let me know if I should file a separate bug for (} mismatching.
syntax-parens-mismatch.PNG
20.8 KB View Download
If this was not evident I would make it explicit: as a consequence of this issue, hovering over variables in the interpreted-as-plain-text segment does not reveal their value/state when stepping. So, the problem is more than cosmetic.

As a side-note, changing the example template string in my screenshot above to the following solves the issue:

 ].map(_ => '../../../assets/scss/' + _ +'?ver=_VERSION_'),
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