Update the addAlias/addGlobalAlias calls to fetch the correct capturing groups.

This commit is contained in:
FaintSpeaker 2021-12-29 14:04:58 -05:00
parent 7a0fdb9ce9
commit d823b5f28f

@ -41,10 +41,11 @@ export function parseAliasDeclaration(dec: string, global = false): boolean {
if (matches == null || matches.length != 7) {
return false;
}
if (global) {
addGlobalAlias(matches[1], matches[2]);
addGlobalAlias(matches[1], matches[4] || matches[6]);
} else {
addAlias(matches[1], matches[2]);
addAlias(matches[1], matches[4] || matches[6]);
}
return true;
}