-
Notifications
You must be signed in to change notification settings - Fork 235
plaintext inside JSX not easily discerned from embedded JS #42
Comments
Good question. I checked out the react and language-javascript-jsx packages, but both use different highlighting. So yeah, your PR would be kinda too tied to the I'm not too familiar with JSX, is omitting the braces invalid? If so, another option might be to make a PR for Or if you just like to change it personally, you could add it to your // customize language-babel
.theme-one-dark-syntax atom-text-editor::shadow {
.source.jsx {
.markup.raw.jsx {
color: #828997;
.meta.brace.curly.js {
color: #abb2bf;
}
}
}
} |
It's not actually invalid without the braces, it's just treated as a plaintext string in the rendered HTML output instead of executed as javascript code. It doesn't mean what it looks like in my example without the braces, which is why I'd like the syntax highlighting to make that more obvious. It looks like I updated my // styles/languages/jsx.less
.source.jsx {
.markup.raw.jsx {
color: @mono-2;
}
} // styles/language.less
.source {
color: @mono-1;
} And I've made a pull request to |
Or just // styles/languages/jsx.less
.source.jsx {
color: @mono-1;
.markup.raw.jsx {
color: @mono-2;
}
} so it's scoped to JSX only? Although that still only affects Ok, this might be a stupid question, but isn't it a bit strange that Hmm.. https://atom.io/packages/language-jsx seems to be taken by another language with the same name. 😣 Anyways, are you ok to keep it in your personal fork or |
I would like to see this mistake:
be more visually dissimilar from the intended code:
like so:
But I'm afraid my implementation is too tightly coupled to language-babel.
Would a PR for such an effect be wanted? If so, is
.meta.brace.curly.js
an appropriate thing to target to reset the style back to normal for JS blocks escaped by{ }
?The text was updated successfully, but these errors were encountered: