Skip to content

Commit 250bdb2

Browse files
committed
doc: update wait.md (#425).
1 parent e9cac42 commit 250bdb2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

command/wait.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ wait 27156
3939

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

42-
[jobs](https://wangchujiang.com/linux-command/c/jobs.html)
42+
[jobs](./jobs.md)

scripts/build.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,15 @@ const contributorsPath = path.resolve(process.cwd(), 'CONTRIBUTORS.svg');
217217
}
218218

219219
function markdownToHTML(str) {
220-
return create({ markdown: str, document: undefined, 'dark-mode': false });
220+
return create({
221+
rewrite: (node) => {
222+
if (node.type === 'element' && node.properties?.href && /.md/.test(node.properties.href) && !/^(https?:\/\/)/.test(node.properties.href)) {
223+
let href = node.properties.href;
224+
node.properties.href = href.replace(/([^\.\/\\]+)\.(md|markdown)/gi, '$1.html');
225+
}
226+
},
227+
markdown: str, document: undefined, 'dark-mode': false
228+
});
221229
}
222230

223231
/**

0 commit comments

Comments
 (0)