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
|
||||
|
||||
// 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}/`.
|
||||
|
Loading…
Reference in New Issue
Block a user