From a7d60179497c768f84d9871602c4befddf63e80d Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 3 Aug 2019 13:39:04 +0800 Subject: [PATCH] Fix website link error. --- template/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/js/index.js b/template/js/index.js index ef01658c61c..9836c8b5bf5 100644 --- a/template/js/index.js +++ b/template/js/index.js @@ -11,7 +11,7 @@ this.root_path = (function () { var elm_path = $$('current_path'); var url = window.location.origin + window.location.pathname; - return elm_path ? url.replace(/\/(c\/)?\w+\.html/, '').replace(/\/$/, '') : ''; + return elm_path ? url.replace(/\/(c\/)?(\w|-)+\.html/, '').replace(/\/$/, '') : ''; })(); this.query = ''; //