Skip to content

Commit

Permalink
doc: update wait.md (#425).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 30, 2022
1 parent e9cac42 commit 250bdb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion command/wait.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ wait 27156

输出当前存在作业号的指令,如下所示:

[jobs](https://wangchujiang.com/linux-command/c/jobs.html)
[jobs](./jobs.md)
10 changes: 9 additions & 1 deletion scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}

/**
Expand Down

0 comments on commit 250bdb2

Please sign in to comment.