diff --git a/docs/.vuepress/markdown/add-base-to-md.js b/docs/.vuepress/markdown/add-base-to-md.js index f6839fd80ad10b64e9f16349a136e2c5c33931c2..1f6923d62fe13ddb551f9f7b34e4ce00cc686d3d 100644 --- a/docs/.vuepress/markdown/add-base-to-md.js +++ b/docs/.vuepress/markdown/add-base-to-md.js @@ -10,7 +10,8 @@ module.exports = function (md, { base = '/' }) { if (attr[0] === 'href') { // /abc/def.md => ${base}/abc/def.md if (attr[1].indexOf('/') === 0 && attr[1].indexOf(base) !== 0) attr[1] = base + attr[1].slice(1) - if (/^\w/.test(attr[1])) attr[1] = './' + attr[1] + // abc/def.md => ./abc/def.md + if (/^\w/.test(attr[1]) && !/^\w+:/.test(attr[1])) attr[1] = './' + attr[1] } }); }