From a40451feaa57cc1cca9f82b2826ef8a68476cc08 Mon Sep 17 00:00:00 2001 From: RIHANE ZAKARIA <26233784+sil3nthill@users.noreply.github.com> Date: Mon, 6 May 2019 16:44:57 +0200 Subject: [PATCH] Define the Head and Body of an HTML Document for challenge solution (#35826) * Define the Head and Body of an HTML Document for challenge solution * edit on check the body tag contain h1 and p tags --- .../define-the-head-and-body-of-an-html-document.english.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document.english.md index 8cfbdace3c..8c8477506a 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document.english.md @@ -33,8 +33,8 @@ tests: testString: assert($('html').children('body').length == 1, 'The body element should be a child of the html element.'); - text: The head element should wrap around the title element. testString: assert(code.match(/\s*?\s*?.*?\s*?<\/title>\s*?<\/head>/gi), 'The <code>head</code> element should wrap around the <code>title</code> element.'); - - text: The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements. - testString: assert($('body').children('h1').length == 1 && $('body').children('p').length == 1, 'The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> elements.'); + - text: The <code>body</code> element should wrap around both the <code>h1</code> and <code>p</code> . + testString: assert(code.match(/<body>\s*?(((<h1>\s*?.*?\s*?<\/h1>\s*?)(<p>(.*\s*)*?<\/p>\s*?))|((<p>\s*?.*?\s*?<\/p>\s*?)(<h1>(.*\s*)*?<\/h1>\s*?)))<\/body>/gi), 'The <code>body</code> element should wrap around both the <code>h1</code>and <code>p</code> elements'); ```