Bug 283870

Summary: Web inspector fails to syntax highlight JS with backtick-delimited format strings
Product: WebKit Reporter: Dimitri Bouniol <dimitri008>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Normal CC: inspector-bugzilla-changes, jonasw, karlcow, rcaliman, roman.deev06, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: Mac (Apple Silicon)   
OS: macOS 15   
Bug Depends on:    
Bug Blocks: 300034    
Attachments:
Description Flags
Screenshot of web inspector showing the broken behavior none

Dimitri Bouniol
Reported 2024-12-01 02:22:38 PST
Created attachment 473406 [details] Screenshot of web inspector showing the broken behavior When the web inspector displays JS with backtick-delimited format strings, the syntax highlighter breaks. For instance, the following fails as soon as `${` is encountered as shown in the attached screenshot: ```js self.addEventListener('push', function(event) { event.waitUntil((async () => { const data = event.data?.json() ?? {}; console.log("Received notification:"); console.log({data}); let title = data.aps?.alert?.title ?? "Jiiiii"; const subtitle = data.aps?.alert?.subtitle; if (subtitle) title = `${title} — ${subtitle}`; const body = data.aps?.alert?.body ?? "New Episodes are Available"; await self.registration.showNotification(title, { body, icon: "/images/icon-fall-web-512.png", data }); })()); }); ```
Attachments
Screenshot of web inspector showing the broken behavior (494.26 KB, image/png)
2024-12-01 02:22 PST, Dimitri Bouniol
no flags
Razvan Caliman
Comment 1 2024-12-04 04:15:56 PST
Razvan Caliman
Comment 2 2025-08-18 12:01:48 PDT
Razvan Caliman
Comment 3 2025-09-22 07:25:53 PDT
*** Bug 299120 has been marked as a duplicate of this bug. ***
EWS
Comment 4 2025-09-22 10:43:05 PDT
Committed 300332@main (fe5c7a50d8e3): <https://commits.webkit.org/300332@main> Reviewed commits have been landed. Closing PR #49538 and removing active labels.
Razvan Caliman
Comment 5 2025-09-29 08:15:42 PDT
*** Bug 299618 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.