一些改进建议
tootal opened this issue · comments
tootal commented
- 遇到无效的链接希望能重定向到404.md或404.html
- 目前笔记中的附件(pdf、doc)链接无法打开
附件链接我暂时在custom.js中监听click解决了,但还是希望能修复。
var setAttachLink=function(){
node=event.target;
var rTail=new RegExp(/\.(pdf|docx)$/);
if(node.href&&node.href.match(rTail)!=null){
var rPre=new RegExp(/\/\#\!docs\//);
newUrl=node.href.replace(rPre,"/docs/");
// console.log(newUrl);
node.href=newUrl;
}
};
window.onload=function(){
var body=document.body;
body.addEventListener('click',function(){
setAttachLink();
});
}
Le Tan commented
最新版应该已经修复了,有空尝试一下?