Skip to content

Commit 515e35a

Browse files
committed
fix: pattern name accross os
1 parent 8178bec commit 515e35a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/markdown-db/src/markdown-db.engine.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export class MarkdownDb<
160160
*/
161161
public computeEntryId(mdFile: FsFile) {
162162
const relativePath = mdFile.dir().relativePathFrom(this._config.cwd);
163-
const dirPath = relativePath.split("/");
163+
// Normalize path separators to forward slashes for consistent splitting across platforms
164+
const normalizedPath = relativePath.replace(/\\/g, "/");
165+
const dirPath = normalizedPath.split("/");
164166
const lastFolderName = dirPath.pop();
165167
let fileName = mdFile.fileNameWithoutExtension();
166168

0 commit comments

Comments
 (0)