简体   繁体   中英

How to prevent github from highlighting apostrophes at my react code

So github is highlighting this part of my code as an error because the apostrophe wont close anywhere.

问题

but the problem is, this is HTML code inside a JS react file, inside the render function.

an example that would trigger this problem on a github pull request is :

render = () => (
  <a>Signer's Title</a>
)

everything after the apostrophe would be highlighted in red.

bad solutions : {`'`} or using a JSX file which is dont want to.

You are using a single quote ' as an apostrophe.

I think you could use the apostrophe character ‎' to avoid this.

example :

render = () => (
  <a>Signer’s Title</a>
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM