Skip to content

Commit

Permalink
fix: normalize output tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DGCK81LNN committed Feb 5, 2024
1 parent f9d5d84 commit 41c1a13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ export function apply(ctx: Context, config: Config) {
return `${source}:\n${alts.join("\n")}`
})

if (single && footnotes.length === 1) return h.text(footnotes[0])
if (single && footnotes.length === 1) return h.escape(footnotes[0])

return [text, footnotes.map((fn, i) => `[${i + 1}] ${fn}`).join("\n")]
.map(s => h.escape(s))
.filter(Boolean)
.join(config.footnotesInSeparateMessage ? "<message />" : "\n")
}

Expand Down

0 comments on commit 41c1a13

Please sign in to comment.