Fix prettier niggles

This commit is contained in:
Oliver Blanthorn 2023-04-06 17:54:44 +02:00
parent e1b0b7da75
commit 2016839df5
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -59,18 +59,17 @@ export async function runRc(rc: string) {
}
export function rcFileToExCmds(rcText: string): string[] {
// Split into individual excmds
const excmds = rcText.split("\n")
// Remove empty and comment lines
const ex= excmds.filter(
const ex = excmds.filter(
x =>
/\S/.test(x) &&
!x.trim().startsWith('"') &&
!x.trim().startsWith("#"),
)
const res= ex.join("\n")
const res = ex.join("\n")
// string-join lines that end with /
const joined = res.replace(/\\\n/g, "")