fatbox/salt — comment on commit e640764e2173335fcf6970b3f98e836ab737e1b3
File:  line 0
By whiteinge:

Sorry for the late reply. This has been on my mind but I haven't come up with any good way to handle both cases either. We could modify the search behavior if the pattern *looks* greedy or if `limit` isn't used but those both feel fragile. This particular `sed` wrapper was written to pretty flexible since it's used in a few different places -- perhaps the thing to do is to make another, simpler wrapper (`file.substitute` perhaps?) that only does the `s/search/replace` function.