feat: support custom terms

This commit is contained in:
Gabe Yuan
2024-01-19 16:02:53 +08:00
parent 59f9dd697f
commit d5fc69e210
13 changed files with 85 additions and 32 deletions

View File

@@ -160,7 +160,7 @@ export default function Content({ q, keeps, translator }) {
{keeps.length > 0 ? (
<span
dangerouslySetInnerHTML={{
__html: text.replace(/#(\d+)#/g, (_, p) => keeps[parseInt(p)]),
__html: text.replace(/\[(\d+)\]/g, (_, p) => keeps[parseInt(p)]),
}}
/>
) : (