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

28 lines
253 B
JavaScript

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