Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript

fix: FILE block regex silently dropped hyphenated paths

nash_suce5c521001a0
diff --git a/src/lib/ingest.ts b/src/lib/ingest.ts
index 8a35256e..b38c93de 100644
--- a/src/lib/ingest.ts
+++ b/src/lib/ingest.ts
@@ -9,7 +9,10 @@ import { getFileName, normalizePath } from "@/lib/path-utils"
import { checkIngestCache, saveIngestCache } from "@/lib/ingest-cache"
import { buildLanguageDirective } from "@/lib/output-language"
-const FILE_BLOCK_REGEX = /---FILE:\s*([^\n-]+?)\s*---\n([\s\S]*?)---END FILE---/g
+// Path capture group allows any non-newline char so hyphenated paths like
+// "wiki/concepts/multi-head-attention.md" are accepted. The lazy `+?` plus
+// the following `\s*---\n` anchor still stops at the closing ---.
+const FILE_BLOCK_REGEX = /---FILE:\s*([^\n]+?)\s*---\n([\s\S]*?)---END FILE---/g
/**
* Build the language rule for ingest prompts.