feat: add http-status-code.md cheatsheet.

This commit is contained in:
jaywcjlove
2022-09-29 22:46:01 +08:00
parent 43bf0d4f77
commit 5094fac68a
10 changed files with 304 additions and 42 deletions

View File

@ -0,0 +1,6 @@
export function rehypeUrls(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');
}
}