better-comments icon indicating copy to clipboard operation
better-comments copied to clipboard

Feature-Request: Add support for JavaScript React JSX comments {/* ... */}

Open joms opened this issue 5 years ago • 6 comments

When commenting JSX in JavaScript React, comments are created with {/* This is a comment */}. It'd be awesome if this was a supported format 😎

joms avatar Jun 17 '19 08:06 joms

and within back ticks would be great... for instance, within styled-components.

const ImageStyled = styled.img`
  /* TODO: add styling */
  flex: 1 1 auto;
`;

wilbsy avatar Jul 15 '19 18:07 wilbsy

No love for JSX :-(

KhimairaCrypto avatar Sep 14 '21 05:09 KhimairaCrypto

Ugly workaround: {/* // TODO: thing */}

thejustinwalsh avatar Sep 25 '21 12:09 thejustinwalsh

@thejustinwalsh Thanks for the tip!

But I hope that JSX (.js, .jsx, .tsx) will still be added.

mheob avatar Oct 22 '21 09:10 mheob

I'll look into this further, but one issue here is the files having multiple languages inside. The events I hook into to decide what to colour are active file changing and extensions changing - at the minute I'm not using any hooks that indicate the active language within the file. However, if that exists, this could be doable

aaron-bond avatar Oct 22 '21 09:10 aaron-bond

@aaron-bond any updates?

mamlzy avatar Aug 31 '23 08:08 mamlzy