mirror of
https://github.com/one-among-us/data.git
synced 2024-11-26 13:07:38 +08:00
[O] Remove unnecessary variable
This commit is contained in:
parent
94dccc0bd1
commit
b57fd52a08
@ -140,7 +140,7 @@ 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
|
||||||
@ -148,7 +148,7 @@ function handleFootnote(md: string) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 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