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?
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
2
Answers
Possibly try the line break option under
which is inside
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