mirror of
https://github.com/NoCrypt/migu.git
synced 2026-05-12 04:50:38 +00:00
fix: code linefeed
This commit is contained in:
parent
f165ba8469
commit
1ff02a60c4
1 changed files with 2 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ import IPC from '@/modules/ipc.js'
|
||||||
import { toast } from 'svelte-sonner'
|
import { toast } from 'svelte-sonner'
|
||||||
import Debug from 'debug'
|
import Debug from 'debug'
|
||||||
|
|
||||||
const debug = Debug('ui:anilist')
|
const debug = Debug('ui:settings')
|
||||||
|
|
||||||
export let profiles = writable(JSON.parse(localStorage.getItem('profiles')) || [])
|
export let profiles = writable(JSON.parse(localStorage.getItem('profiles')) || [])
|
||||||
/** @type {{viewer: import('./al').Query<{Viewer: import('./al').Viewer}>, token: string} | null} */
|
/** @type {{viewer: import('./al').Query<{Viewer: import('./al').Viewer}>, token: string} | null} */
|
||||||
|
|
@ -67,6 +67,7 @@ window.addEventListener('paste', ({ clipboardData }) => {
|
||||||
if (state.endsWith('/')) state = state.slice(0, -1)
|
if (state.endsWith('/')) state = state.slice(0, -1)
|
||||||
if (state.includes('%')) state = decodeURIComponent(state)
|
if (state.includes('%')) state = decodeURIComponent(state)
|
||||||
// remove linefeed characters from the state
|
// remove linefeed characters from the state
|
||||||
|
code = code.replace(/(\r\n|\n|\r)/gm, '')
|
||||||
state = state.replace(/(\r\n|\n|\r)/gm, '')
|
state = state.replace(/(\r\n|\n|\r)/gm, '')
|
||||||
handleMalToken(code, state)
|
handleMalToken(code, state)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue