mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
This regular expression expects 7 potential matches.
1: The whole string 2: the alias name 3 & 4: the command text in two locations 5 & 6: the quoted command text in two styles 7: the group that selects between the two qoted styles.
This commit is contained in:
parent
91243f4742
commit
7a0fdb9ce9
@ -38,7 +38,7 @@ export function printAliases(): void {
|
||||
export function parseAliasDeclaration(dec: string, global = false): boolean {
|
||||
const re = /^([\w|!|%|,|@|-]+)=(("(.+)")|('(.+)'))$/;
|
||||
const matches = dec.match(re);
|
||||
if (matches == null || matches.length != 3) {
|
||||
if (matches == null || matches.length != 7) {
|
||||
return false;
|
||||
}
|
||||
if (global) {
|
||||
|
Loading…
Reference in New Issue
Block a user