TYPO-FIX JS-regex-match-non-whitespace-characters (#38407)

Added Markdown to correctly display second test
pull/38412/head
Vincent Shury 2020-03-21 00:13:48 -04:00 committed by GitHub
parent 88e1952478
commit 6920634e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ Change the regex <code>countNonWhiteSpace</code> to look for multiple non-whites
tests: tests:
- text: Your regex should use the global flag. - text: Your regex should use the global flag.
testString: assert(countNonWhiteSpace.global); testString: assert(countNonWhiteSpace.global);
- text: Your regex should use the shorthand character <code>\S/code> to match all non-whitespace characters. - text: Your regex should use the shorthand character <code>\S</code> to match all non-whitespace characters.
testString: assert(/\\S/.test(countNonWhiteSpace.source)); testString: assert(/\\S/.test(countNonWhiteSpace.source));
- text: Your regex should find 35 non-spaces in <code>"Men are from Mars and women are from Venus."</code> - text: Your regex should find 35 non-spaces in <code>"Men are from Mars and women are from Venus."</code>
testString: assert("Men are from Mars and women are from Venus.".match(countNonWhiteSpace).length == 35); testString: assert("Men are from Mars and women are from Venus.".match(countNonWhiteSpace).length == 35);