Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function parseLog(gitLogFull, gitLogTitles) {
var commitConf = configParser.getCommitConf();
function getRegex(tag) {
return new RegExp(escapeSpecialCharactersRegex(tag) + '.*$', 'mg');
}
function getRegexMatch(gitLog, regex) {
return gitLog.match(regex);
}
commitConf.forEach(function (prop) {
var ArrayCommitsType = getRegexMatch(gitLogTitles, getRegex(prop.tag)) || [];
ArrayCommitsType.forEach(function (commitMsg) {
gitLogFull = gitLogFull.replace(getRegex(commitMsg), colors[prop.color](commitMsg));
});
});