Update parseAliasDeclaration to match single quote

- Matches foo="bar" and foo='bar'
- Does not match foo="bar' or foo='bar"
This commit is contained in:
Robert Klebes 2021-12-26 14:14:37 -05:00
parent d99b03d12e
commit 6a9f6c05ec

@ -36,7 +36,7 @@ export function printAliases(): void {
// Returns true if successful, false otherwise // Returns true if successful, false otherwise
export function parseAliasDeclaration(dec: string, global = false): boolean { export function parseAliasDeclaration(dec: string, global = false): boolean {
const re = /^([\w|!|%|,|@|-]+)="(.+)"$/; const re = /^([\w|!|%|,|@|-]+)=(("(.+)")|('(.+)'))$/;
const matches = dec.match(re); const matches = dec.match(re);
if (matches == null || matches.length != 3) { if (matches == null || matches.length != 3) {
return false; return false;