skip to Main Content

I’m using React and writing tags in a tsx file. When I use Reformat code, spaces appear instead of newlines. Tell me how to fix this and what could be causing this?

enter image description here

2

Answers


  1. Possibly try the line break option under

    keep when reformatting

    which is inside

    Editor > code style > javascript > Wrapping and Braces

    Login or Signup to reply.
  2. JSX tags are considered ‘inline’ when formatting, this can’t be configured unfortunately. I can only suggest adding line breaks manually, having the Keep line breaks in text enabled to preserve them on re-formatting. Related youtrack ticket: https://youtrack.jetbrains.com/issue/WEB-37966

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search