mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
restore old escape handling and parser flag for strict escaping
This commit is contained in:
@ -1740,14 +1740,14 @@ function modelCallback(_, model) {
|
||||
* @param {SlashCommandScope} scope The scope to be used when executing the commands.
|
||||
* @returns {Promise<SlashCommandClosureResult>}
|
||||
*/
|
||||
async function executeSlashCommands(text, handleParserErrors = true, scope = null, handleExecutionErrors = false) {
|
||||
async function executeSlashCommands(text, handleParserErrors = true, scope = null, handleExecutionErrors = false, parserFlags = null) {
|
||||
if (!text) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let closure;
|
||||
try {
|
||||
closure = parser.parse(text);
|
||||
closure = parser.parse(text, true, parserFlags);
|
||||
closure.scope.parent = scope;
|
||||
} catch (e) {
|
||||
if (handleParserErrors && e instanceof SlashCommandParserError) {
|
||||
|
Reference in New Issue
Block a user