fix: dotall flag not supported in firefox (#38762)
Addresses https://github.com/freeCodeCamp/freeCodeCamp/pull/38546#issuecomment-625611675 where it's pointed out that Firefox doesn't support the /s regex flag yet. This workaround matches anything that's not blank.
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							82ed7e232e
						
					
				
				
					commit
					b017ce192c
				
			| @@ -43,7 +43,7 @@ tests: | |||||||
|       } |       } | ||||||
|       assert.throws(declared, ReferenceError); |       assert.throws(declared, ReferenceError); | ||||||
|   - text: You should add a local <code>myVar</code> variable. |   - text: You should add a local <code>myVar</code> variable. | ||||||
|     testString: assert(/functionmyLocalScope\(\)\{.+(var|let|const)myVar.*}/s.test(code.replace(/\s/g, ''))); |     testString: assert(/functionmyLocalScope\(\)\{.+(var|let|const)myVar[\s\S]*}/.test(code.replace(/\s/g, ''))); | ||||||
|  |  | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user