WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 283870
299120
Optional chaining breaks syntax highlighting in string interpolation
https://bugs.webkit.org/show_bug.cgi?id=299120
Summary
Optional chaining breaks syntax highlighting in string interpolation
roman.deev06
Reported
2025-09-18 13:20:14 PDT
Created
attachment 476794
[details]
Example of broken syntax highlighting Minimal example: ``` <!DOCTYPE html> <html lang="en"> <script> const x = undefined const foo = x?.value console.log(`${1234}`) console.log("bye") </script> <body> </body> </html> ``` In the attachment, you can see that the code
> `) > console.log("bye")
it starts to be highlighted as a string. If you remove the `?` , the backlight works correctly
Attachments
Example of broken syntax highlighting
(52.57 KB, image/png)
2025-09-18 13:20 PDT
,
roman.deev06
no flags
Details
Test Case (Same as Comment 0)
(175 bytes, text/html)
2025-09-18 15:13 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2025-09-18 15:13:12 PDT
Created
attachment 476795
[details]
Test Case (Same as
Comment 0
) It reproduces on WebKit ToT (Minibrowser) [
300179@main
].
Razvan Caliman
Comment 2
2025-09-22 07:25:53 PDT
Thank you for filing the issue! This will be fixed by the patch for
https://bugs.webkit.org/show_bug.cgi?id=283870
*** This bug has been marked as a duplicate of
bug 283870
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug