highlightjs / highlightjs/highlight.js

(javscript/typescript) improve JSX comment highlighting

Open
#1,625 6 comments 3 reactions 1 assignee Claimed by @joshgoebel View on GitHub
enhancement help welcome
Dominant language
JavaScript
Stars
25k
Forks
3.8k
Avg merge
11h 35m
Merged PRs (30d)
3

Description

Live example on [the npm website](https://www.npmjs.com/package/react-ck5#propseditorstate-and-propsonstatechange).

![react-ck5 readme on npmjs.com](https://user-images.githubusercontent.com/936069/32349287-c40d8324-bfd3-11e7-8f20-039e4dec5891.png)

```js
state = { editorState: null }
render() {
return (


this.setState({ editorState })}
/>
e.preventDefault()}
onClick={() => {
this.setState(s => update(s, 'editorState.bold.value', value => !value));
}}
>
Toggle bold


);
}
```

## Expected behavior

Comments in jsx attribute positions should look like comments. The [spec](https://facebook.github.io/jsx/) isn't explicit about it, but babel, acorn, typescript, and flow all support the syntax.

---

Thanks!

[original issue](https://github.com/npm/www/issues/267)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.