From a02c2952ca2f5c2cae27ac4828227888a4a4d684 Mon Sep 17 00:00:00 2001 From: Emil <7682404+em411@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:17:32 +0200 Subject: [PATCH] style: replace spaces with tabs --- javascript/prompt_format.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/javascript/prompt_format.js b/javascript/prompt_format.js index ba38b16..0899ded 100644 --- a/javascript/prompt_format.js +++ b/javascript/prompt_format.js @@ -59,14 +59,14 @@ class LeFormatter { // ===== Main Format Logics ===== static formatPipeline(id, dedupe, removeUnderscore, autoRefresh) { - const textAreaElement = gradioApp().getElementById(id); + const textAreaElement = gradioApp().getElementById(id); - if (!textAreaElement) { - console.log(`Could not find element with id ${id}`); - return; - } + if (!textAreaElement) { + console.log(`Could not find element with id ${id}`); + return; + } - const textArea = textAreaElement.querySelector('textarea') + const textArea = textAreaElement.querySelector('textarea'); let lines = textArea.value.split('\n') @@ -179,12 +179,12 @@ class LeFormatter { static injectTagShift(id) { const textAreaElement = gradioApp().getElementById(id); - if (!textAreaElement) { - console.log(`Could not find element with id ${id}`); - return; - } + if (!textAreaElement) { + console.log(`Could not find element with id ${id}`); + return; + } - const textarea = textAreaElement.querySelector('textarea') + const textarea = textAreaElement.querySelector('textarea'); textarea.addEventListener('wheel', (event) => { if (event.shiftKey) { @@ -250,14 +250,14 @@ class LeFormatter { } static injectBracketEscape(id) { - const textAreaElement = gradioApp().getElementById(id); + const textAreaElement = gradioApp().getElementById(id); - if (!textAreaElement) { - console.log(`Could not find element with id ${id}`); - return; - } + if (!textAreaElement) { + console.log(`Could not find element with id ${id}`); + return; + } - const textarea = textAreaElement.querySelector('textarea') + const textarea = textAreaElement.querySelector('textarea'); textarea.addEventListener('keydown', (event) => { if (event.ctrlKey && event.key === '\\') {