WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
202374
Web Inspector: JS Formatter: unexpected newlines added inside template string expression
https://bugs.webkit.org/show_bug.cgi?id=202374
Summary
Web Inspector: JS Formatter: unexpected newlines added inside template string...
Devin Rousso
Reported
2019-09-30 15:26:28 PDT
* STEPS TO REPRODUCE: 1. inspect <
https://webkit.org/demos/webgpu/hello-triangle.html
> 2. pretty print 'hello-triangle.js' => the text of `whlslSource` has extra newlines before `colorLocation` and `positionLocation`
Attachments
Patch
(15.78 KB, patch)
2019-09-30 16:54 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2019-09-30 16:54:33 PDT
Created
attachment 379859
[details]
Patch This feels a bit hacky, but considering how basically anything can be put inside a template literal, it needs a more widespread solution. I'd imagine that most uses of template literals are usually simple (e.g. print a variable, call a function, or do some basic math), so effectively preventing all non-forced newlines seems fine to me.
Joseph Pecoraro
Comment 2
2019-09-30 19:21:29 PDT
Comment on
attachment 379859
[details]
Patch r=me! Nice, this has bothered me for a while. I thought I filed a bug on it but I guess not. Good solution.
WebKit Commit Bot
Comment 3
2019-09-30 21:57:45 PDT
Comment on
attachment 379859
[details]
Patch Clearing flags on attachment: 379859 Committed
r250544
: <
https://trac.webkit.org/changeset/250544
>
WebKit Commit Bot
Comment 4
2019-09-30 21:57:46 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5
2019-09-30 21:58:18 PDT
<
rdar://problem/55866664
>
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