Fixed Codacy issues

Also added specification link in JSON files
This commit is contained in:
Angelos Chalaris
2018-05-30 19:51:47 +03:00
parent 34fa03ec33
commit 5040461a9f
4 changed files with 22 additions and 10 deletions

View File

@ -89,10 +89,10 @@ const getCodeBlocks = str => {
}
m.forEach((match, groupIndex) => {
results.push(match);
})
});
}
return results;
}
};
// Gets the textual content for a snippet file.
const getTextualContent = str => {
const regex = /###.*\n*([\s\S]*?)```/g;
@ -104,8 +104,8 @@ const getTextualContent = str => {
}
m.forEach((match, groupIndex) => {
results.push(match);
})
});
}
return results[1];
}
};
module.exports = {readSnippets, readTags, optimizeNodes, capitalize, objectFromPairs, isTravisCI, hashData, shuffle, getCodeBlocks, getTextualContent};