fix: add backslash to path test for windows paths (#39454)
* fix: add backslash to path test for windows paths * fix: add posix seperator to path tester Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
This commit is contained in:
		@@ -175,7 +175,10 @@ Trying to parse ${fullPath}`);
 | 
				
			|||||||
exports.createChallenge = createChallenge;
 | 
					exports.createChallenge = createChallenge;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function getEnglishPath(fullPath) {
 | 
					function getEnglishPath(fullPath) {
 | 
				
			||||||
  const posix = path.posix.normalize(fullPath);
 | 
					  const posix = path
 | 
				
			||||||
 | 
					    .normalize(fullPath)
 | 
				
			||||||
 | 
					    .split(path.sep)
 | 
				
			||||||
 | 
					    .join(path.posix.sep);
 | 
				
			||||||
  const match = posix.match(/(.*curriculum\/challenges\/)([^/]*)(.*)(\2)(.*)/);
 | 
					  const match = posix.match(/(.*curriculum\/challenges\/)([^/]*)(.*)(\2)(.*)/);
 | 
				
			||||||
  const lang = getChallengeLang(fullPath);
 | 
					  const lang = getChallengeLang(fullPath);
 | 
				
			||||||
  if (!isAcceptedLanguage(lang))
 | 
					  if (!isAcceptedLanguage(lang))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user