diff --git a/static/mrdoc/mrdoc-docs.js b/static/mrdoc/mrdoc-docs.js index ce26dfe..8f229ca 100644 --- a/static/mrdoc/mrdoc-docs.js +++ b/static/mrdoc/mrdoc-docs.js @@ -484,16 +484,13 @@ function keyLight(id, key, bgColor){ key = decodeURI(key); var oDiv = document.getElementById(id), sText = oDiv.innerHTML, - bgColor = bgColor || "#c00", - sKey = ""+key+"", num = -1, rStr = new RegExp(key, "ig"), rHtml = new RegExp("\<.*?\>","ig"), //匹配html元素 - aHtml = sText.match(rHtml); //存放html元素的数组 + aHtml = sText.match(rHtml), //存放html元素的数组 sText = sText.replace(rHtml, '{~}'); //替换html标签 - // sText = sText.replace(rStr,sKey); //替换key sText = sText.replace(rStr,function(text){ - return ""+text+"" + return "" + text +"" }); //替换key sText = sText.replace(/{~}/g,function(){ //恢复html标签 num++; @@ -501,5 +498,4 @@ function keyLight(id, key, bgColor){ }); oDiv.innerHTML = sText; } -}; -keyLight('doc-content',getQueryVariable("highlight")) \ No newline at end of file +}; \ No newline at end of file diff --git a/template/app_doc/doc.html b/template/app_doc/doc.html index 2ba6971..047e5d5 100644 --- a/template/app_doc/doc.html +++ b/template/app_doc/doc.html @@ -242,9 +242,9 @@ }); //修改a标签链接新窗口打开 - $('#content').on('click','a',function(e){ - e.target.target = '_blank'; - }); + // $('#content').on('click','a',function(e){ + // e.target.target = '_blank'; + // }); // 显示文档下载弹出框 $("#download_doc").click(function(r){ var layer = layui.layer; diff --git a/template/app_doc/docs_base.html b/template/app_doc/docs_base.html index c68de43..05ee9d2 100644 --- a/template/app_doc/docs_base.html +++ b/template/app_doc/docs_base.html @@ -335,26 +335,6 @@ {% endif %} - - {% if debug %} {% else %} @@ -383,5 +363,27 @@ {% block custom_script %} {% endblock %} + \ No newline at end of file