feedkeeper 0.46.0 → 0.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feedkeeper",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "description": "A lightweight, self-hosted RSS reader and remote MCP server for your news, blogs, and AI workflows.",
5
5
  "keywords": [
6
6
  "rss",
@@ -1,4 +1,30 @@
1
- const TOKEN_RE = /(\w+:"[^"]*"|\w+:[^\s]+|\S+)/g;
1
+ function tokenizeSearchQuery(raw) {
2
+ const trimmed = raw.trim();
3
+ if (!trimmed)
4
+ return [];
5
+ const tokens = [];
6
+ let current = "";
7
+ let inQuotes = false;
8
+ for (let i = 0; i < trimmed.length; i++) {
9
+ const ch = trimmed[i];
10
+ if (ch === "\"") {
11
+ inQuotes = !inQuotes;
12
+ current += ch;
13
+ }
14
+ else if (!inQuotes && /\s/.test(ch)) {
15
+ if (current) {
16
+ tokens.push(current);
17
+ current = "";
18
+ }
19
+ }
20
+ else {
21
+ current += ch;
22
+ }
23
+ }
24
+ if (current)
25
+ tokens.push(current);
26
+ return tokens;
27
+ }
2
28
  /**
3
29
  * Splits a search query into structured filter operators (`has:audio`, `has:video`,
4
30
  * `has:notes`, `has:media`, `is:unread`, `is:read`, `is:starred`, `feed:...`)
@@ -17,7 +43,7 @@ export function parseSearchQuery(raw) {
17
43
  hasOperators: false,
18
44
  };
19
45
  const textParts = [];
20
- const tokens = raw.trim().match(TOKEN_RE) ?? [];
46
+ const tokens = tokenizeSearchQuery(raw);
21
47
  for (const token of tokens) {
22
48
  const lower = token.toLowerCase();
23
49
  if (lower === "has:audio") {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedkeeper/server",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }