mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
As opposed to making the match variable include the entire regex match, overlay the replacement string over the regex match and splice out whatever's already in the replacement string from the regex match. This new strategy helps save time when editing messages since match prefix and suffix phrases have a lower chance of being repeated on every edit. The overlay strategy also preserves uniqueness if the user decides to change something in the edited text. However, overlay can cause issues especially with punctiation, so the strategy isn't chosen by default when creating a new regex. Signed-off-by: kingbri <bdashore3@proton.me>