Being able to use prettier to format code snippets before passing them to torchlight is a dream!
However, I've been regularly encountering a case where prettier moves my comment to a new line, changing which line torchlight highlights.
const fn = () => (
<div> // [tl! highlight]
<div></div>
</div>
)
Which prettier formatting transforms to:
const fn = () => (
<div>
{' '}
// [tl! highlight]
<div></div>
</div>
)
(With the [tl! highlight] is moved to a new line)
Does anyone have tips on how to prevent prettier from doing this? Or workarounds?
Being able to use prettier to format code snippets before passing them to torchlight is a dream!
However, I've been regularly encountering a case where prettier moves my comment to a new line, changing which line torchlight highlights.
Which prettier formatting transforms to:
(With the
[tl! highlight]is moved to a new line)Does anyone have tips on how to prevent prettier from doing this? Or workarounds?