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:
parent
94dccc0bd1
commit
b57fd52a08
@ -140,15 +140,15 @@ function handleFootnote(md: string) {
|
|||||||
if (!md.includes('[^')) return md
|
if (!md.includes('[^')) return md
|
||||||
|
|
||||||
// Replace footnote references with HTML superscript tags
|
// 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
|
// Footnote definition
|
||||||
`<li id="footnote-${id}">${text}<a href="#footnote-ref-${id}">↩</a></li>` :
|
`<li id="footnote-${id}">${text}<a href="#footnote-ref-${id}">↩</a></li>` :
|
||||||
// Footnote reference
|
// Footnote reference
|
||||||
`<sup><a href="#footnote-${id}" id="footnote-ref-${id}">${id}</a></sup>`
|
`<sup><a href="#footnote-${id}" id="footnote-ref-${id}">${id}</a></sup>`
|
||||||
)
|
)
|
||||||
|
|
||||||
// Wrap the footnote definitions in an ordered list
|
// 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}/`.
|
// Copy `people/${dirname}/photos` to `dist/people/${dirname}/`.
|
||||||
|
Loading…
Reference in New Issue
Block a user