From 594299ffbd04018dfab610091d959fa86a2db2af Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Sat, 25 Mar 2017 16:25:03 +0800 Subject: [PATCH] fix: .md file extension regex --- src/core/route/hash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/route/hash.js b/src/core/route/hash.js index d8870bea1..beba1f271 100644 --- a/src/core/route/hash.js +++ b/src/core/route/hash.js @@ -70,7 +70,7 @@ export function toURL (path, params) { route.query = merge({}, route.query, params) path = route.path + stringifyQuery(route.query) - path = path.replace(/\.md/g, '') + path = path.replace(/\.md(\?)|\.md$/, '$1') return cleanPath('#/' + path) }