1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-23 03:27:38 +08:00

[F] Fix html comment could not be used in markdown

This commit is contained in:
Elihuso Quigley 2024-01-04 11:19:21 +08:00
parent 56b17e7b69
commit e42a79de35

View File

@ -50,7 +50,7 @@ function buildPeopleInfoAndList() {
const info: any = YAML.load(infoFile); const info: any = YAML.load(infoFile);
// Read the page.md of that language // Read the page.md of that language
const markdown = fs.readFileSync(path.join(srcPath, `page${lang}.md`), "utf-8"); const markdown = fs.readFileSync(path.join(srcPath, `page${lang}.md`), "utf-8").replaceAll("<!--", "{/* ").replaceAll("-->", " */}");
// Get the markdown header // Get the markdown header
const mdMeta = metadataParser(markdown).metadata const mdMeta = metadataParser(markdown).metadata
@ -118,7 +118,7 @@ function buildPeoplePages() {
for (const lang of ['', '.zh_hant', '.en']) for (const lang of ['', '.zh_hant', '.en'])
{ {
// Read markdown page and remove markdown meta // Read markdown page and remove markdown meta
let markdown = metadataParser(fs.readFileSync(path.join(srcPath, `page${lang}.md`), "utf-8")).content; let markdown = metadataParser(fs.readFileSync(path.join(srcPath, `page${lang}.md`), "utf-8")).content.replaceAll("<!--", "{/* ").replaceAll("-->", " */}");
// Autocorrect markdown // Autocorrect markdown
markdown = autocorrect.formatFor(markdown, 'markdown') markdown = autocorrect.formatFor(markdown, 'markdown')