[chore] Apply lint and formatter

a9aff676ba9a12ba63c4f4ffef2e77a4fde8c54b

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -4Showing whitespace changes
public/scripts/extensions/translate/index.js+4 -4
@@ -410,13 +410,13 @@ async function translate(text, lang) {
410 const chunks = text.split(/!\[.*?]\([^)]*\)/);410 const chunks = text.split(/!\[.*?]\([^)]*\)/);
411 const links = [...text.matchAll(/!\[.*?]\([^)]*\)/g)];411 const links = [...text.matchAll(/!\[.*?]\([^)]*\)/g)];
412412
413 let r = "";413 let result = '';
414 for (let i = 0; i < chunks.length; i++) {414 for (let i = 0; i < chunks.length; i++) {
415 r += await translateInner(chunks[i], lang);415 result += await translateInner(chunks[i], lang);
416 if (i < links.length) r += links[i][0];416 if (i < links.length) result += links[i][0];
417 }417 }
418418
419 return r;419 return result;
420 } catch (error) {420 } catch (error) {
421 console.log(error);421 console.log(error);
422 toastr.error(String(error), 'Failed to translate message');422 toastr.error(String(error), 'Failed to translate message');