Add path cbs for intuition

This commit is contained in:
kwaroran
2024-09-09 03:20:43 +09:00
parent b18f85bf67
commit 3a690118bd

View File

@@ -250,7 +250,7 @@ async function renderHighlightableMarkdown(data:string) {
}
export const assetRegex = /{{(raw|img|image|video|audio|bg|emotion|asset|video-img|source)::(.+?)}}/g
export const assetRegex = /{{(raw|path|img|image|video|audio|bg|emotion|asset|video-img|source)::(.+?)}}/g
async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|character, mode:'normal'|'back', mode2:'unset'|'pre'|'post' = 'unset'){
const db = get(DataBase)
@@ -319,6 +319,7 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
}
switch(type){
case 'raw':
case 'path':
return path.path
case 'img':
return `<img src="${path.path}" alt="${path.path}" style="${assetWidthString} "/>`