Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/event/scroll.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isMobile } from '../util/env';
import * as dom from '../util/dom';
import Tweezer from 'tweezer.js';
import cssEscape from 'css.escape';
import { isMobile } from '../util/env';
import * as dom from '../util/dom';

const nav = {};
let hoverOver = false;
Expand Down Expand Up @@ -146,7 +146,7 @@ export function scrollIntoView(path, id) {
const section = dom.find('#' + cssEscape(id));
section && scrollTo(section);

const li = nav[getNavKey(path, id)];
const li = nav[decodeURIComponent(getNavKey(path, id))];
const sidebar = dom.getNode('.sidebar');
const active = dom.find(sidebar, 'li.active');
active && active.classList.remove('active');
Expand Down
2 changes: 1 addition & 1 deletion src/core/event/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function getAndActive(router, el, isParent, autoTitle) {
links
.sort((a, b) => b.href.length - a.href.length)
.forEach(a => {
const href = a.getAttribute('href');
const href = decodeURI(a.getAttribute('href'));
const node = isParent ? a.parentNode : a;

if (hash.indexOf(href) === 0 && !target) {
Expand Down