From 3e0495a529284ffc50461faf5bfbd46c10ea1e8d Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sat, 13 Jun 2026 22:42:57 +0400 Subject: [PATCH] Moved parentheses check to run before dirty text content extraction --- src/lib/philomena/search/QueryLexer.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/philomena/search/QueryLexer.ts b/src/lib/philomena/search/QueryLexer.ts index 76d2d5f..57ac1b9 100644 --- a/src/lib/philomena/search/QueryLexer.ts +++ b/src/lib/philomena/search/QueryLexer.ts @@ -207,12 +207,6 @@ export class QueryLexer { break; } - if (this.#matchAt(QueryLexer.#dirtyTextContent, index, result)) { - resultValue += result.match![0]; - index += result.match![0].length; - continue; - } - if (this.#value[index] === QueryLexer.#bracketsOpenCharacter) { let bracketsContent = QueryLexer.#bracketsOpenCharacter + this.#parseDirtyText(index + 1); @@ -227,6 +221,12 @@ export class QueryLexer { continue; } + if (this.#matchAt(QueryLexer.#dirtyTextContent, index, result)) { + resultValue += result.match![0]; + index += result.match![0].length; + continue; + } + break; }