diff --git a/script/content-migrations/remove-map-topics.js b/script/content-migrations/remove-map-topics.js index b19b694703..ec24064da7 100755 --- a/script/content-migrations/remove-map-topics.js +++ b/script/content-migrations/remove-map-topics.js @@ -3,6 +3,7 @@ const fs = require('fs') const path = require('path') const walk = require('walk-sync') +const stripHtmlComments = require('strip-html-comments') const languages = require('../../lib/languages') const frontmatter = require('../../lib/read-frontmatter') const addRedirectToFrontmatter = require('../../lib/redirects/add-redirect-to-frontmatter') @@ -26,6 +27,10 @@ const categoryIndexFiles = fullDirectoryPaths.map(fullDirectoryPath => walk(full categoryIndexFiles.forEach(categoryIndexFile => { let categoryIndexContent = fs.readFileSync(categoryIndexFile, 'utf8') + if (categoryIndexFile.endsWith('github/getting-started-with-github/index.md')) { + categoryIndexContent = stripHtmlComments(categoryIndexContent.replace(/\n