修复脚注的会跳链接的问题
This commit is contained in:
parent
ab94fa0939
commit
98e0f90d12
|
|
@ -126,6 +126,7 @@
|
|||
var noteReg = /\[\^([ a-zA-Z\d]+)]/g;
|
||||
var footReg = /\[\^([ a-zA-Z\d]+)]: ?([\S\s]+?)(?=\[\^(?:[ a-zA-Z\d]+)]|\n\n|$)/g;
|
||||
var templates = $.trim($('#template\\:footnote').text()).split(/[\r\n]+\s*/g);
|
||||
templates[4] += templates[5] + templates[6] +templates[7] +templates[8];
|
||||
var html = '';
|
||||
//提取脚注内容
|
||||
text = text.replace(footReg, function (match, s1, s2, index) {
|
||||
|
|
@ -175,7 +176,7 @@
|
|||
}
|
||||
html = templates[1].replace('{{list}}', html);
|
||||
}
|
||||
return text + html;
|
||||
return text + '\n<br>' + html;
|
||||
};
|
||||
|
||||
//设置js注释隐藏
|
||||
|
|
|
|||
|
|
@ -543,6 +543,7 @@ $(function () {
|
|||
//当有状态记录时,直接跳转
|
||||
if (e.originalEvent.state) {
|
||||
path = e.originalEvent.state.path;
|
||||
path = path.replace(/%26/g, '&');
|
||||
//改变导航
|
||||
changeNav(path);
|
||||
//改变页面
|
||||
|
|
@ -552,6 +553,7 @@ $(function () {
|
|||
else {
|
||||
path = tools.getURLParameter('file');
|
||||
path = !path ? '首页' : decodeURI(path);
|
||||
path = path.replace(/%26/g, '&');
|
||||
//判断 url 路径是否和当前一样,不一样才跳转
|
||||
if (path != curPath) {
|
||||
//改变导航
|
||||
|
|
|
|||
Loading…
Reference in New Issue