Loosen route replacement regex to allow for dashes in routes.

This commit is contained in:
Bart Kamphorst
2018-11-12 11:57:28 +01:00
parent 64c4ee9c05
commit b50872497e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
var uploadDest = 'uploads';
var perPageUploads = '{{per_page_uploads}}';
if (perPageUploads == 'true') {
uploadDest = uploadDest + window.location.pathname.replace(/.*gollum\/\w+\//, "/").replace(/\.[^/.]+$/, "")
uploadDest = uploadDest + window.location.pathname.replace(/.*gollum\/[-\w]+\//, "/").replace(/\.[^/.]+$/, "")
}
{{#page}}
var pageFullPath = '{{url_path}}';