From 42e1ade148038a53a09d72bf96cae107e8274469 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 10 Apr 2024 01:04:12 +0300 Subject: [PATCH] Add a {{noop}} macro --- public/scripts/macros.js | 1 + public/scripts/templates/macros.html | 1 + 2 files changed, 2 insertions(+) diff --git a/public/scripts/macros.js b/public/scripts/macros.js index f89197d3f..74c89b715 100644 --- a/public/scripts/macros.js +++ b/public/scripts/macros.js @@ -283,6 +283,7 @@ export function evaluateMacros(content, env) { content = replaceVariableMacros(content); content = content.replace(/{{newline}}/gi, '\n'); content = content.replace(/\n*{{trim}}\n*/gi, ''); + content = content.replace(/{{noop}}/gi, ''); content = content.replace(/{{input}}/gi, () => String($('#send_textarea').val())); // Substitute passed-in variables diff --git a/public/scripts/templates/macros.html b/public/scripts/templates/macros.html index 46336c083..dbb50db80 100644 --- a/public/scripts/templates/macros.html +++ b/public/scripts/templates/macros.html @@ -5,6 +5,7 @@