mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
temp foreign char regex
This commit is contained in:
parent
b9a77ab8f1
commit
fecd82fe75
@ -129,7 +129,7 @@ async function openGrasscutterFolder() {
|
|||||||
|
|
||||||
// https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html
|
// https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html
|
||||||
function hasForeignChars(str) {
|
function hasForeignChars(str) {
|
||||||
let re1 = /^[\x00-\x7F]+$/g
|
let re1 = /^[A-Za-z\d,.?;:\\/'"!$%() ]*/g
|
||||||
str = str.replace(/\s/g, '')
|
str = str.replace(/\s/g, '')
|
||||||
|
|
||||||
debug.log('Checking for foreign chars in path: ', str)
|
debug.log('Checking for foreign chars in path: ', str)
|
||||||
|
@ -528,7 +528,7 @@ async function setGrasscutterFolder() {
|
|||||||
async function launchOfficial() {
|
async function launchOfficial() {
|
||||||
const config = await getCfg()
|
const config = await getCfg()
|
||||||
|
|
||||||
debug.log('Launching game')
|
debug.log('Launching game at ' + config.gameexe)
|
||||||
|
|
||||||
Neutralino.os.execCommand(`"${config.gameexe}"`)
|
Neutralino.os.execCommand(`"${config.gameexe}"`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user