Gotcha. If we update the index, then I think the replacement string will be wrong when we make first update to doc after an edit.

Is that correct? If so, then I see 2 options:

1. Immediately update doc with updated params. I was hoping to avoid this, but I guess it's not so bad since user can undo.

2. Keep `match` object that same but add on a new property which is an array of `validatedParams`. 

Other suggestions?