Skip to content

Commit fc8c106

Browse files
committed
docs: fix comments of relativePath refiner
1 parent 2ad4058 commit fc8c106

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builtin/refiner/relative_path.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ type DetailAfter = {
1111
relpath: string;
1212
};
1313

14+
/**
15+
* Options for the `relativePath` Refiner.
16+
*/
1417
export type RelativePathOptions = {
18+
/**
19+
* The base directory to calculate the relative path from.
20+
*/
1521
base?: string;
1622
};
1723

@@ -27,12 +33,10 @@ export function relativePath(
2733
const base = options.base ?? await fn.getcwd(denops);
2834
signal?.throwIfAborted();
2935

30-
// Convert each item's path to a relative path
3136
for await (const item of items) {
3237
const relpath = relative(base, item.detail.path);
3338
const value = item.value.replace(item.detail.path, relpath);
3439

35-
// Yield item with updated relative path and original absolute path
3640
yield {
3741
...item,
3842
value,

0 commit comments

Comments
 (0)