mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Sometimes the matched regex string needs to be pruned before replacement. Add a method for the user to provide strings which globally trims a regex match before any replacement is done. Example without trim: input - <Manami's thoughts: This is a thought> regex - /<([^>]*)>/g output - <Manami's thoughts: Manami's thoughts: This is a thought> With trim: input - <Manami's thoughts: This is a thought> regex - /<([^>]*)>/g trim - ["{{char}}'s thoughts: "] output - <Manami's thoughts: This is a thought> Signed-off-by: kingbri <bdashore3@proton.me>