Fix: Match single quotes (#17539)

* Fix: Match single quotes

* Fix: slash direction

* Fix: Regex expression and refined tests
pull/18182/head
Vimal Raghubir 2018-06-12 22:31:31 -04:00 committed by mrugesh mohapatra
parent 9e84a54d72
commit e72755461c
1 changed files with 2 additions and 2 deletions

View File

@ -1253,11 +1253,11 @@
"tests": [
{
"text": "Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".",
"testString": "assert($('a').text().match(/information about batteries/g), 'Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".');"
"testString": "assert($('a').text().match(/^(information about batteries)$/g), 'Your code should move the anchor <code>a</code> tags from around the words \"Click here\" to wrap around the words \"information about batteries\".');"
},
{
"text": "Make sure your <code>a</code> element has a closing tag.",
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a href=\"\">/g).length, 'Make sure your <code>a</code> element has a closing tag.');"
"testString": "assert(code.match(/<\\/a>/g) && code.match(/<\\/a>/g).length === code.match(/<a href=(''|\"\")>/g).length, 'Make sure your <code>a</code> element has a closing tag.');"
}
],
"solutions": [],