mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-06-23 18:22:20 +00:00
Fixed quoted term not processing starting & ending quotes
This commit is contained in:
@@ -41,11 +41,13 @@ export class QuotedTermToken extends Token {
|
||||
}
|
||||
|
||||
static decode(value: string): string {
|
||||
return value.replace(/\\([\\"])/g, "$1");
|
||||
return value
|
||||
.replaceAll(/\\([\\"])/g, "$1")
|
||||
.replaceAll(/^"|"$/g, '');
|
||||
}
|
||||
|
||||
static encode(value: string): string {
|
||||
return value.replace(/[\\"]/g, "\\$&");
|
||||
return `"${value.replaceAll(/[\\"]/g, "\\$&")}"`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user