mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Merge pull request #2003 from saulrh/rc-linejoin
Teach config-rc to string-join lines ending with \
This commit is contained in:
commit
30fb7cbe0a
1 changed files with 5 additions and 1 deletions
|
@ -50,7 +50,11 @@ export async function runRc(rc: string) {
|
|||
}
|
||||
|
||||
export function rcFileToExCmds(rcText: string): string[] {
|
||||
const excmds = rcText.split("\n")
|
||||
// string-join lines that end with /
|
||||
const joined = rcText.replace(/\\\n/g, "")
|
||||
|
||||
// Split into individual excmds
|
||||
const excmds = joined.split("\n")
|
||||
|
||||
// Remove empty and comment lines
|
||||
return excmds.filter(x => /\S/.test(x) && !x.trim().startsWith('"'))
|
||||
|
|
Loading…
Add table
Reference in a new issue