1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-22 19:24:51 +08:00

[O] Remove unnecessary variable

This commit is contained in:
Azalea 2024-02-28 18:58:33 -05:00
parent 94dccc0bd1
commit b57fd52a08

View File

@ -140,15 +140,15 @@ function handleFootnote(md: string) {
if (!md.includes('[^')) return md
// Replace footnote references with HTML superscript tags
md = md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ?
return md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ?
// Footnote definition
`<li id="footnote-${id}">${text}<a href="#footnote-ref-${id}">↩</a></li>` :
// Footnote reference
`<sup><a href="#footnote-${id}" id="footnote-ref-${id}">${id}</a></sup>`
)
// Wrap the footnote definitions in an ordered list
return md.replace(/(<li id="footnote.*<\/li>)/gs, '<ol>\n$1\n</ol>')
.replace(/(<li id="footnote.*<\/li>)/gs, '<ol>\n$1\n</ol>')
}
// Copy `people/${dirname}/photos` to `dist/people/${dirname}/`.