2
0
Эх сурвалжийг харах

fix: getPagePath would include a trailing (#1323) (#1324)

This excludes the trailing slash from the locale code.
alancnet 5 жил өмнө
parent
commit
a457e82b16

+ 1 - 1
server/helpers/page.js

@@ -4,7 +4,7 @@ const crypto = require('crypto')
 const path = require('path')
 
 const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/i
-const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?\/)?(.*)/i
+const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?)\/?(.*)/i
 
 const contentToExt = {
   markdown: 'md',