Justin Ridgewell f49234aa69
Add sourcemap markings for each line of a string (#12086)
* Add sourcemap markings for each line of a string

Fixes https://github.com/babel/babel/issues/12083

* Fix for multiple newlines

* Optimize with indexOf

* Comment explaining newline search
2020-09-22 21:36:21 -04:00

22 lines
252 B
JavaScript

// Newline
`before
after`; // Newline newline
`before
after`; // Newline LineContinuation
`before
\
after`; // LineContinuation
`before\
after`; // LineContinuation newline
`before\
after`; // LineContinuation LineContinuation
`before\
\
after`;