lib.path: Indent comments the same
This commit is contained in:
@@ -121,7 +121,8 @@ let
|
|||||||
|
|
||||||
in /* No rec! Add dependencies on this file at the top. */ {
|
in /* No rec! Add dependencies on this file at the top. */ {
|
||||||
|
|
||||||
/* Append a subpath string to a path.
|
/*
|
||||||
|
Append a subpath string to a path.
|
||||||
|
|
||||||
Like `path + ("/" + string)` but safer, because it errors instead of returning potentially surprising results.
|
Like `path + ("/" + string)` but safer, because it errors instead of returning potentially surprising results.
|
||||||
More specifically, it checks that the first argument is a [path value type](https://nixos.org/manual/nix/stable/language/values.html#type-path"),
|
More specifically, it checks that the first argument is a [path value type](https://nixos.org/manual/nix/stable/language/values.html#type-path"),
|
||||||
@@ -317,7 +318,8 @@ in /* No rec! Add dependencies on this file at the top. */ {
|
|||||||
subpath = joinRelPath deconstructed.components;
|
subpath = joinRelPath deconstructed.components;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Whether a value is a valid subpath string.
|
/*
|
||||||
|
Whether a value is a valid subpath string.
|
||||||
|
|
||||||
A subpath string points to a specific file or directory within an absolute base directory.
|
A subpath string points to a specific file or directory within an absolute base directory.
|
||||||
It is a stricter form of a relative path that excludes `..` components, since those could escape the base directory.
|
It is a stricter form of a relative path that excludes `..` components, since those could escape the base directory.
|
||||||
@@ -364,7 +366,8 @@ in /* No rec! Add dependencies on this file at the top. */ {
|
|||||||
subpathInvalidReason value == null;
|
subpathInvalidReason value == null;
|
||||||
|
|
||||||
|
|
||||||
/* Join subpath strings together using `/`, returning a normalised subpath string.
|
/*
|
||||||
|
Join subpath strings together using `/`, returning a normalised subpath string.
|
||||||
|
|
||||||
Like `concatStringsSep "/"` but safer, specifically:
|
Like `concatStringsSep "/"` but safer, specifically:
|
||||||
|
|
||||||
@@ -469,7 +472,8 @@ in /* No rec! Add dependencies on this file at the top. */ {
|
|||||||
${subpathInvalidReason subpath}'';
|
${subpathInvalidReason subpath}'';
|
||||||
splitRelPath subpath;
|
splitRelPath subpath;
|
||||||
|
|
||||||
/* Normalise a subpath. Throw an error if the subpath isn't [valid](#function-library-lib.path.subpath.isValid).
|
/*
|
||||||
|
Normalise a subpath. Throw an error if the subpath isn't [valid](#function-library-lib.path.subpath.isValid).
|
||||||
|
|
||||||
- Limit repeating `/` to a single one.
|
- Limit repeating `/` to a single one.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user