doc: update `wait.md` (#425).

This commit is contained in:
jaywcjlove 2022-09-30 15:13:32 +08:00
parent e9cac426da
commit 250bdb2d5b
2 changed files with 10 additions and 2 deletions

View File

@ -39,4 +39,4 @@ wait 27156
输出当前存在作业号的指令,如下所示:
[jobs](https://wangchujiang.com/linux-command/c/jobs.html)
[jobs](./jobs.md)

View File

@ -217,7 +217,15 @@ const contributorsPath = path.resolve(process.cwd(), 'CONTRIBUTORS.svg');
}
function markdownToHTML(str) {
return create({ markdown: str, document: undefined, 'dark-mode': false });
return create({
rewrite: (node) => {
if (node.type === 'element' && node.properties?.href && /.md/.test(node.properties.href) && !/^(https?:\/\/)/.test(node.properties.href)) {
let href = node.properties.href;
node.properties.href = href.replace(/([^\.\/\\]+)\.(md|markdown)/gi, '$1.html');
}
},
markdown: str, document: undefined, 'dark-mode': false
});
}
/**