@plannotator/pi-extension 0.24.0 → 0.24.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/generated/resolve-file.ts +9 -2
- package/package.json +1 -1
- package/plannotator.html +2 -2
- package/review-editor.html +2 -2
|
@@ -469,9 +469,16 @@ function resolveMarkdownFileCore(
|
|
|
469
469
|
return { kind: "not_found", input };
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
-
// 2. Exact relative path from project root
|
|
472
|
+
// 2. Exact relative path from project root. An explicit path the user
|
|
473
|
+
// typed (one containing a separator, including `../` that escapes the
|
|
474
|
+
// root) is honored when it exists — the same trust already extended to
|
|
475
|
+
// absolute paths above. Bare filenames stay restricted to the fuzzy
|
|
476
|
+
// in-root search below so a stray `notes.md` can't resolve to a parent.
|
|
473
477
|
const fromRoot = resolve(projectRoot, searchInput);
|
|
474
|
-
if (
|
|
478
|
+
if (
|
|
479
|
+
fileExists(fromRoot) &&
|
|
480
|
+
(isWithinProjectRoot(fromRoot, projectRoot) || searchInput.includes("/"))
|
|
481
|
+
) {
|
|
475
482
|
return { kind: "found", path: fromRoot };
|
|
476
483
|
}
|
|
477
484
|
|
package/package.json
CHANGED