From 082b269dcea01b8fcc84fff1747c883db9cbc990 Mon Sep 17 00:00:00 2001 From: Kim Leung <71901468+leungkimho@users.noreply.github.com> Date: Wed, 10 Feb 2021 04:40:51 -0700 Subject: [PATCH] fix(learn): backslashes in description & hint text (#40801) Correct example code in description and last hints text to match the last assertion test's actual and expected inputs. The string input with a single backslash throws an unterminated string constant error (single backslash starts a regex). No change to last assertion test as it was written correctly with a double backslash and passing as expected. --- ...split-a-character-string-based-on-change-of-character.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/split-a-character-string-based-on-change-of-character.md b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/split-a-character-string-based-on-change-of-character.md index 0f7bbb37b7..4bb28fba9a 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/split-a-character-string-based-on-change-of-character.md +++ b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/split-a-character-string-based-on-change-of-character.md @@ -11,13 +11,13 @@ dashedName: split-a-character-string-based-on-change-of-character Split a (character) string into comma (plus a blank) delimited strings based on a change of character (left to right). Blanks should be treated as any other character (except they are problematic to display clearly). The same applies to commas. For instance, the string:
-"gHHH5YY++///\" +"gHHH5YY++///\\"should be split as:
-["g", "HHH", "5", "YY", "++", "///", "\" ]; +["g", "HHH", "5", "YY", "++", "///", "\\" ];# --hints-- @@ -80,7 +80,7 @@ assert.deepEqual(split('sssmmmaaammmaaat'), [ ]); ``` -`split("gHHH5YY++///\")` should return `["g", "HHH", "5", "YY", "++", "///", "\\"]`. +`split("gHHH5YY++///\\")` should return `["g", "HHH", "5", "YY", "++", "///", "\\"]`. ```js assert.deepEqual(split('gHHH5YY++///\\'), [