Merge pull request #34510 from akhileshh/master

fix: Fixes  api word capitalization freeCodeCamp
This commit is contained in:
Akhilesh Halageri
2018-12-03 01:56:18 -08:00
committed by Stuart Taylor
parent d9ac45868c
commit ed5b434ad1
3 changed files with 8 additions and 8 deletions

View File

@@ -10,7 +10,9 @@ const preFormattedBlockNames = {
jquery: 'jQuery',
'json-apis-and-ajax': 'JSON APIs and Ajax',
'mongodb-and-mongoose': 'MongoDB and Mongoose',
'the-dom': 'The DOM'
'the-dom': 'The DOM',
'apis-and-microservices': 'APIs and Microservices',
'apis-and-microservices-projects': 'APIs and Microservices Projects'
};
const noFormatting = ['and', 'for', 'of', 'the', 'up', 'with'];

View File

@@ -7,6 +7,7 @@ const {
} = require('../../curriculum/getChallenges');
const utils = require('./');
const { locale } = require('../config/env.json');
const { blockNameify } = require('./blockNameify');
const dasherize = utils.dasherize;
const nameify = utils.nameify;
@@ -56,9 +57,6 @@ function prepareChallenge(challenge) {
);
}
challenge.block = dasherize(challenge.block);
challenge.superBlock = challenge.superBlock
.split('-')
.map(word => _.capitalize(word))
.join(' ');
challenge.superBlock = blockNameify(challenge.superBlock);
return challenge;
}