Environment
- lat.md version: 0.11.0
- OS: Windows 10
- Shell: bash (Git Bash / WSL)
Problem
On Windows, all [[wiki-links]] resolve as broken when running lat check. The lat locate command also returns no results.
Root cause
In dist/src/lattice.js, parseSections and extractRefs use Node's path.relative() which returns backslash-separated paths on Windows (e.g. lat.md\architecture). The buildFileIndex function splits on /, so it produces an empty index on Windows — causing all wiki links to fail resolution.
Reproduction
- Install lat.md on Windows:
npm install lat.md
- Create a
lat.md/ directory with two pages that cross-link via [[page-name]]
- Run
lat check — all wiki links report as broken
- Run
lat locate "Section Name" — returns no results
Fix
Normalize paths to forward slashes after path.relative() calls in parseSections and extractRefs:
const relativePath = relative(basePath, filePath).replace(/\/g, '/');
Workaround
Running on Linux/macOS (e.g. CI) is not affected. Local Windows development shows false positives.
Environment
Problem
On Windows, all
[[wiki-links]]resolve as broken when runninglat check. Thelat locatecommand also returns no results.Root cause
In
dist/src/lattice.js,parseSectionsandextractRefsuse Node'spath.relative()which returns backslash-separated paths on Windows (e.g.lat.md\architecture). ThebuildFileIndexfunction splits on/, so it produces an empty index on Windows — causing all wiki links to fail resolution.Reproduction
npm install lat.mdlat.md/directory with two pages that cross-link via[[page-name]]lat check— all wiki links report as brokenlat locate "Section Name"— returns no resultsFix
Normalize paths to forward slashes after
path.relative()calls inparseSectionsandextractRefs:Workaround
Running on Linux/macOS (e.g. CI) is not affected. Local Windows development shows false positives.