From e5e1e07e1af11e43d5cf9b618c9acc9e728117d5 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Sun, 18 Dec 2016 15:37:24 +0800 Subject: [PATCH] Fixed highlight sidebar using chinese ids --- CHANGELOG.md | 1 + src/event.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 134cf6c..15f1abb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Bug fixes - Remove table background color +- Fixed highlight sidebar using chinese ids ## 1.1.5 ### Features diff --git a/src/event.js b/src/event.js index 2bd0748..8259b4a 100644 --- a/src/event.js +++ b/src/event.js @@ -18,7 +18,7 @@ export function scrollActiveSidebar () { if (href !== '/') href = href.match(/#([^#]+)$/g)[0].slice(1) - nav[href] = li + nav[decodeURIComponent(href)] = li } function highlight () {