proper fix for uncomment html challenge, improved codemirror performance

This commit is contained in:
terakilobyte
2015-05-27 15:29:31 -04:00
parent 79b20d9798
commit 57fad7d923
3 changed files with 5 additions and 5 deletions

View File

@ -60,10 +60,11 @@ var otherTestsForNow = "<script src='/js/lib/coursewares/iFrameScripts_0.0.2.js'
var delay;
// Initialize CodeMirror editor with a nice html5 canvas demo.
editor.on("keypress", function () {
editor.on("keyup", function () {
clearTimeout(delay);
delay = setTimeout(updatePreview, 300);
});
var nodeEnv = prodOrDev === 'production' ? 'http://www.freecodecamp.com' : 'http://localhost:3001';
function updatePreview() {
goodTests = 0;

View File

@ -90,8 +90,7 @@
"Uncomment the <code>h1</code>, <code>h2</code> and <code>p</code> elements.",
"Commenting is a way that you can leave comments within your code without affecting the code itself.",
"Commenting is also a convenient way to make code inactive without having to delete it entirely.",
"You can start a comment with <code>&#60;!--</code> and end a comment with <code>--&#62;</code>.",
"Lastly, someone's made a typo on one of the tags. Go ahead and fix it!"
"You can start a comment with <code>&#60;!--</code> and end a comment with <code>--&#62;</code>."
],
"tests": [
"assert($('h1').length > 0, 'The h1 element should not be commented. It should be visible in the browser.')",
@ -102,7 +101,7 @@
"<!--",
"<h1>Hello World</h1>",
"",
"<h>CatPhotoApp</h2>",
"<h2>CatPhotoApp</h2>",
"",
"<br/>",
"",

View File

@ -91,4 +91,4 @@ block content
.animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.4.js")
script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.5.js")