Update extract.js

This commit is contained in:
Angelos Chalaris
2019-02-21 18:33:13 +02:00
committed by GitHub
parent 306f5f6f89
commit 6f7190d24a

View File

@ -21,23 +21,7 @@ attempt("snippet_data.json generation", () => {
.split("\n")
.map(v => v.replace(/[*-] /g, ""))
.filter(v => v.trim() !== "")
// const answer = getSection("#### Answer", contents)
// const goodToHear = getSection("#### Good to hear", contents, false)
// .split("\n")
// .map(v => v.replace(/[*-] /g, ""))
// .filter(v => v.trim() !== "")
// const links = getSection("##### Additional links", contents)
// .split("\n")
// .filter(v =>
// /(\/\*[\w\'\s\r\n\*]*\*\/)|(\/\/[\w\s\']*)|(\<![\-\-\s\w\>\/]*\>)/.test(
// v
// )
// )
// .map(v => v.replace(/[*-] /g, ""))
// .filter(v => v.trim() !== "" && !v.includes("tags"))
return {
name,
title,
@ -56,4 +40,4 @@ attempt("snippet_data.json generation", () => {
})
console.log(`${chalk.green("SUCCESS!")} snippet_data.json file generated!`);
console.timeEnd("Extractor");
console.timeEnd("Extractor");