[webkit-reviews] review denied: [Bug 217613] Web Inspector: Syntax highlighting for JSX is incorrect : [Attachment 417413] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 15:57:10 PST 2021


Devin Rousso <drousso at apple.com> has denied Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 217613: Web Inspector: Syntax highlighting for JSX is incorrect
https://bugs.webkit.org/show_bug.cgi?id=217613

Attachment 417413: Patch

https://bugs.webkit.org/attachment.cgi?id=417413&action=review




--- Comment #6 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 417413
  --> https://bugs.webkit.org/attachment.cgi?id=417413
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417413&action=review

r-, see below

> Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js:691
> +    CodeMirror.defineMIME(WI.mimeTypeForFileExtension("js"), "jsx");

I think CodeMirror only allows one mode per MIME type, which means that this
would cause every `"text/javascript"` file to now be interpreted as JSX.  IMO,
if the extension is `.js` and the MIME type is `text/javascript` then we really
should be treating it as JavaScript, not JSX.


More information about the webkit-reviews mailing list