blob: 0dea8fdbb66553f6b3286611a4ee319929f1f954 [file] [log] [blame]
function removeCodeAndComment(body) {
return body
.replace(/<!--[\w\W\r\n]*?-->/gmi, '')
.replace(/`{3}(.|\n)*`{3}/gmi, '');
}
function replaceAll(str, search, replacement) {
return str.replace(new RegExp(search, 'g'), replacement);
}
module.exports = {
removeCodeAndComment,
replaceAll
}