Explorar o código

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

This excludes the trailing slash from the locale code.
alancnet %!s(int64=5) %!d(string=hai) anos
pai
achega
a457e82b16
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/helpers/page.js

+ 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',