fix: .md file extension regex

This commit is contained in:
qingwei.li 2017-03-25 16:25:03 +08:00
parent e9bbfd4c53
commit 594299ffbd

View File

@ -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)
}