diff --git a/client/src/components/layouts/components/guide/NavPanel.js b/client/src/components/layouts/components/guide/NavPanel.js index 616deb36dd..6d57df984b 100644 --- a/client/src/components/layouts/components/guide/NavPanel.js +++ b/client/src/components/layouts/components/guide/NavPanel.js @@ -23,8 +23,8 @@ function NoArticles() { Could you  { - if (dirName.replace(/(\s|\_)/, '') !== dirName) { + if (dasherize(dirName) !== dirName) { return reject( new Error(` - Invalid character found in '${dirName}', please use '-' for spaces +Invalid or upper case character found in '${dirName}', please use '-' for spaces +and all folder names must be lower case. Valid characters are [a-z0-9\\-.]. - Found in: - ${fullPath} - `) - ); - } - if (dirName.toLowerCase() !== dirName) { - return reject( - new Error(` -Upper case characters found in ${dirName}, all folder names must be lower case - - Found in : + Found in: ${fullPath} `) ); @@ -107,7 +99,7 @@ exports.checkFrontmatter = function checkFrontmatter( } catch (e) { console.log(` - The below occured in: + The below occurred in: ${fullPath}