diff --git a/models/FieldGuide.js b/models/FieldGuide.js
index b705f44774..b9c2613eed 100644
--- a/models/FieldGuide.js
+++ b/models/FieldGuide.js
@@ -6,6 +6,10 @@ var fieldGuideSchema = new mongoose.Schema({
type: String,
unique: false
},
+ dashedName: {
+ type: String,
+ unique: false
+ },
description: {
type: Array,
unique: false
diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json
index f5f92f61fa..1f22850de3 100644
--- a/seed_data/challenges/basic-html5-and-css.json
+++ b/seed_data/challenges/basic-html5-and-css.json
@@ -53,7 +53,7 @@
],
"tests": [
"assert(($('h2').length > 0), 'Create an h2
element.')",
- "assert(editor.match(/<\\/h2>/g) && editor.match(/<\\/h2>/g).length === editor.match(/
h2
element has a closing tag.')",
+ "assert(editor.match(/<\\/h2>/g) && editor.match(/<\\/h2>/g).length === editor.match(/h2
element has a closing tag.')",
"assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($('h2').text()), 'Your h2
element should have the text \"CatPhotoApp\"')",
"assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1
element should have the text \"Hello World\"')"
],
@@ -89,7 +89,7 @@
"tests": [
"assert(($('p').length > 0), 'Create a p
element.')",
"assert.isTrue((/hello(\\s)+paragraph/gi).test($('p').text()), 'Your p
element should have the text \"Hello Paragraph\".')",
- "assert(new RegExp('', 'gi').test(editor), 'Be sure to complete your p
element with a closing tag.')"
+ "assert(editor.match(/<\\/p>/g) && editor.match(/<\\/p>/g).length === editor.match(//g).length, 'Make sureyour p
element has a closing tag.')"
],
"challengeSeed": [
"
p
elements with Kitty Ipsum text.')",
- "assert(editor.match(/<\\/p>/g).length > 1, 'Be sure that each of your p
elements has a closing tag.')",
+ "assert(editor.match(/<\\/p>/g).length > 1, 'Make sureeach of your p
elements has a closing tag.')",
"assert($('p').css('font-size') === '16px', 'Give your p
elements the font-size of 16px.')"
],
"challengeSeed": [
@@ -1041,7 +1041,7 @@
"assert($('a').text().match(/cat\\sphotos/gi).length > 0, 'Your a
element should have the anchor text of \"cat photos\"')",
"assert($('a[href=\\'http://www.catphotoapp.com\\']').parent().is('p'), 'Your anchor element should be wrapped within a paragraph element.')",
"assert($('p').text().match(/click\\shere\\sfor/gi), 'Your p
element should have the text \"click here for\".')",
- "assert(editor.match(/<\\/p>/g).length > 2, 'Be sure that each of your p
elements has a closing tag.')"
+ "assert(editor.match(/<\\/p>/g).length > 2, 'Make sureeach of your p
elements has a closing tag.')"
],
"challengeSeed": [
"",
@@ -1168,7 +1168,7 @@
"tests": [
"assert(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Your anchor
element should be a dead link with a href
attribute set to \"#\".')",
"assert($('a').children('img').length > 0, 'Wrap your image element inside an anchor element.')",
- "assert(editor.match(/<\\/a>/g).length > 1, 'Be sure that each of your a
elements has a closing tag.')"
+ "assert(editor.match(/<\\/a>/g).length > 1, 'Make sureeach of your a
elements has a closing tag.')"
],
"challengeSeed": [
"",
@@ -1295,8 +1295,8 @@
"tests": [
"assert($('ul').length > 0, 'Create a ul
element.')",
"assert($('li').length > 2, 'Add three li
elements to your ul
element.')",
- "assert(editor.match(/<\\/ul>/g), 'Be sure that your ul
element has a closing tag.')",
- "assert(editor.match(/<\\/li>/g) && editor.match(/<\\/li>/g).length > 2, 'Be sure that each of your li
elements has a closing tag.')"
+ "assert(editor.match(/<\\/ul>/g), 'Make sureyour ul
element has a closing tag.')",
+ "assert(editor.match(/<\\/li>/g) && editor.match(/<\\/li>/g).length > 2, 'Make sureeach of your li
elements has a closing tag.')"
],
"challengeSeed": [
"",
@@ -1362,9 +1362,9 @@
"assert($('ol').length > 0, 'You should have an ol
element on your webpage.')",
"assert($('li').length > 5, 'You should have three li
elements within your ul
element.')",
"assert($('li').length > 5, 'You should have three li
elements within your ol
element.')",
- "assert(editor.match(/<\\/ol>/g), 'Be sure that your ol
element has a closing tag.')",
- "assert(editor.match(/<\\/ul>/g), 'Be sure that your ul
element has a closing tag.')",
- "assert(editor.match(/<\\/li>/g).length > 5, 'Be sure that each of your li
elements has a closing tag.')"
+ "assert(editor.match(/<\\/ol>/g), 'Make sureyour ol
element has a closing tag.')",
+ "assert(editor.match(/<\\/ul>/g), 'Make sureyour ul
element has a closing tag.')",
+ "assert(editor.match(/<\\/li>/g).length > 5, 'Make sureeach of your li
elements has a closing tag.')"
],
"challengeSeed": [
"",
@@ -1651,7 +1651,7 @@
"assert($('form').children('button').length > 0, 'Your form should have a button inside it.')",
"assert($('button').attr('type') === 'submit', 'Your submit button should have be of input type \"submit\".')",
"assert($('button').text().match(/submit/gi), 'Your submit button should have the text \"submit\".')",
- "assert(editor.match(/<\\/button>/g), 'Be sure that your button
element has a closing tag.')"
+ "assert(editor.match(/<\\/button>/g), 'Make sureyour button
element has a closing tag.')"
],
"challengeSeed": [
"",
@@ -2125,7 +2125,7 @@
"assert($('div').children('ol').length > 0, 'Wrap your ol
element inside your div
element.')",
"assert($('div').children('p').length > 1, 'Wrap your p
element inside your div
element.')",
"assert($('div').children('ul').length > 0, 'Wrap your ul
element inside your div
element.')",
- "assert(editor.match(/<\\/div>/g) && editor.match(/<\\/div>/g).length === editor.match(/div
element has a closing tag.')"
+ "assert(editor.match(/<\\/div>/g) && editor.match(/<\\/div>/g).length === editor.match(/div
element has a closing tag.')"
],
"challengeSeed": [
"",
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 4de82c5a26..d55d682a66 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -2,6 +2,7 @@
{
"_id": "bd7158d9c441eddfaeb5bdef",
"name": "How do I use this guide?",
+ "dashedName": "how-do-i-use-this-guide",
"description": [
"Like JavaScript, Ruby and Python are high-level scripting languages that can be used for full stack web development.
", @@ -189,6 +198,7 @@ { "_id": "bd7158d9c437eddfaeb5bdef", "name": "What is pair programming, and why is it special?", + "dashedName": "what-is-pair-programming-and-why-is-it-special", "description": [ "Building nonprofit projects is the main way that our campers learn full stack JavaScript and agile software development. Once you complete the Free Code Camp Waypoints, Bonfires, Ziplines and Basejumps, you'll begin this process.
", @@ -635,6 +657,7 @@ { "_id": "bd7158d9c447eddfaeb5bdef", "name": "How do I install Screenhero?", + "dashedName": "how-do-i-install-screenhero", "description": [ "Free Code Camp is committed to respecting the privacy of visitors to our web sites and web applications. The guidelines below explain how we protect the privacy of visitors to FreeCodeCamp.com and its features.
", @@ -746,6 +772,7 @@ { "_id": "bd7158d9c436eddfaeb5bd3c", "name": "How can I reach the Free Code Camp team to interview them for my publication?", + "dashedName": "how-can-i-reach-the-free-code-camp-team-to-interview-them-for-my-publication", "description": [ "Contributing to our field guide is a great way to establish your history on GitHub, add to your portfolio, and help other campers. If you have a question about JavaScript or programming in general that you'd like us to add to the field guide, here are two ways to get it into the guide:
",