From 006c5aba8dc0ec907da6d14f951de6b2151fe088 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Fri, 15 Apr 2016 11:33:47 -0700 Subject: [PATCH] Tempfix for tutorial 2 --- views/tutorial/html/2.erb | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/views/tutorial/html/2.erb b/views/tutorial/html/2.erb index a5686cfa..4976ba4d 100644 --- a/views/tutorial/html/2.erb +++ b/views/tutorial/html/2.erb @@ -35,7 +35,38 @@ function checkHomework() { var html = editor.getValue() - var match = '.+.+'+answer+'.+.+' + var match = '.+' + + var re = new XRegExp(match, 'gis') + + if(html.match(re) === null) { + notok("You're missing the HTML element tag! Your web site must begin with and end with .") + return + } +/* + var match = '.+.+' + + var re = new XRegExp(match, 'gis') + + if(html.match(re) === null) { + notok("You need to add some text inside the <body></body>.") + return + } +*/ + var match = 'Hello World' + + var re = new XRegExp(match, 'gis') + + if(html.match(re) !== null) { + notok("Hint: Try changing \"Hello World\" to something else.") + return + } + + sessionStorage.setItem('tutorialHtml', html) + ok('Great, you did it!', '/tutorial/html/3') +/* + var match = '.+.+.+' + var re = new XRegExp(match, 'gis') if(html.match(re) === null) { @@ -44,5 +75,6 @@ sessionStorage.setItem('tutorialHtml', html) ok('Great, you did it!', '/tutorial/html/3') } +*/ }