```js > new (require('magic-string'))('00').remove(0, 1).replace('0', '1').toString() '10' ``` Shouldn't the result be `1`?
Activity
antfu commentedon Sep 22, 2022
.replacematches against the original string, which is a document caveat. I am not sure if there is a way to improve that, if so I am open for PR.fisker commentedon Sep 22, 2022
I'm not sure exactly how it works, I generated a new MagicString before replacing for now. prettier/prettier@77ac062
Tal500 commentedon Oct 4, 2022
Is it problematic to get as parameter if the user wants to perform the search on the original string or not?