cleanup(remark-include): stray log; clarify

This commit is contained in:
mei (ckie) 2024-11-24 02:14:11 +02:00
parent 35123ba4a7
commit f0a9cb879e
Signed by: ckie
GPG key ID: 13E79449C0525215

View file

@ -19,11 +19,9 @@ export const remarkInclude: Plugin<[], Root> = ({ resolveFrom }: { resolveFrom:
&& node.meta !== "options"))
return [node];
// !== "options" because those are special, parsed from options.json:
// TODO: temporarily !== "options" because those are special, parsed from options.json:
// https://github.com/NixOS/nixpkgs/blob/d31617bedffa3e5fe067feba1c68b1a7f644cb4f/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manual.py#L81-L102
console.log("awa", node);
const includes = node.value.split("\n");
return includes.flatMap(included => {
@ -34,7 +32,7 @@ export const remarkInclude: Plugin<[], Root> = ({ resolveFrom }: { resolveFrom:
includeContents = readSync(includePath, "utf8");
} catch (err) {
throw new Error(
`The @include file path at ${includePath} was not found.\n\nInclude Location: ${file.path}:${node.position.start.line}:${node.position.start.column}`
`The {=include=} file path at ${includePath} was not found.\n\nInclude Location: ${file.path}:${node.position.start.line}:${node.position.start.column}`
);
}