Previously, because of how multimaps worked, a multi-replacement without any values would result in the replacement token (and the prefix) remaining in place. This causes issues if a key was associated with a potentially-empty list, since if the list is empty, the token and prefix remains which certainly causes issues with the program to run.
By changing from a mulitmap to a map of collections, this allows for 'empty inputs', where the key still exists in the map and therefore the replacement token and prefix are removed even if there are no values for that key.
The original multimap method is renamed and made to forward to the new method, to preserve compatibility and to allow for cleaner calls in situtations where the caller guarantees the multi-replacement key will always have at least one value (such as a file input and additional inputs in the form of a set of files).
Previously, because of how multimaps worked, a multi-replacement without any values would result in the replacement token (and the prefix) remaining in place. This causes issues if a key was associated with a potentially-empty list, since if the list is empty, the token and prefix remains which certainly causes issues with the program to run.
By changing from a mulitmap to a map of collections, this allows for 'empty inputs', where the key still exists in the map and therefore the replacement token and prefix are removed even if there are no values for that key.
The original multimap method is renamed and made to forward to the new method, to preserve compatibility and to allow for cleaner calls in situtations where the caller guarantees the multi-replacement key will always have at least one value (such as a file input and additional inputs in the form of a set of files).
/cc @SizableShrimp