cleanup(remark-include): stray log; clarify
This commit is contained in:
parent
35123ba4a7
commit
f0a9cb879e
|
@ -19,11 +19,9 @@ export const remarkInclude: Plugin<[], Root> = ({ resolveFrom }: { resolveFrom:
|
||||||
&& node.meta !== "options"))
|
&& node.meta !== "options"))
|
||||||
return [node];
|
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
|
// 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");
|
const includes = node.value.split("\n");
|
||||||
|
|
||||||
return includes.flatMap(included => {
|
return includes.flatMap(included => {
|
||||||
|
@ -34,7 +32,7 @@ export const remarkInclude: Plugin<[], Root> = ({ resolveFrom }: { resolveFrom:
|
||||||
includeContents = readSync(includePath, "utf8");
|
includeContents = readSync(includePath, "utf8");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(
|
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}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue