style: replace spaces with tabs

pull/6/head
Emil 2023-10-01 22:17:32 +02:00 committed by GitHub
parent 9af1c4a4c2
commit a02c2952ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 17 deletions

View File

@ -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 === '\\') {