Skip to content

Commit

Permalink
fix: broken links to same page heading, fix #278, fix #279
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Oct 15, 2017
1 parent 26cc466 commit 91d6337
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/router/history/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export class HashHistory extends History {
path = path.replace(/\.md(\?)|\.md$/, '$1')

if (local) {
path = currentRoute.substr(0, currentRoute.indexOf('?')) + path
const idIndex = currentRoute.indexOf('?')
path =
(idIndex > 0 ? currentRoute.substr(0, idIndex) : currentRoute) + path
}

return cleanPath('#/' + path)
Expand Down

0 comments on commit 91d6337

Please sign in to comment.