feat: Enable dynamic assets for processing data and replace missing asset names with the closest match

This commit is contained in:
kwaroran
2024-05-22 14:52:08 +09:00
parent 641aea7477
commit 77849d2a9a
7 changed files with 80 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ DOMPurify.addHook("uponSanitizeAttribute", (node, data) => {
})
const assetRegex = /{{(raw|img|video|audio|bg|emotion|asset|video-img)::(.+?)}}/g
export const assetRegex = /{{(raw|img|video|audio|bg|emotion|asset|video-img)::(.+?)}}/g
async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|character, mode:'normal'|'back', mode2:'unset'|'pre'|'post' = 'unset'){
const db = get(DataBase)