Files
freeCodeCamp/tools/scripts/formatter/fcc-md-to-gfm/validate-text.js
2020-12-15 21:22:02 +05:30

15 lines
439 B
JavaScript

const { insertSpaces, checkCodeToBackticks } = require('./transformChallenges');
const readDirP = require('readdirp-walk');
const challengeDir = '../../../../curriculum/challenges/english';
readDirP({ root: challengeDir, fileFilter: ['*.md'] }).on('data', file => {
if (file.stat.isFile()) {
insertSpaces(file.fullPath, true)
.then(checkCodeToBackticks)
.catch(() => {
console.log(file.path);
});
}
});