fix: 🐛 Various bugfixes

This commit is contained in:
Jesse Wierzbinski 2024-05-11 23:23:38 -10:00
parent 52c1f1c57f
commit 6d2b607f2b
No known key found for this signature in database
10 changed files with 76 additions and 111 deletions

View file

@ -13,8 +13,8 @@ export const useAccount = (
watchEffect(() => {
if (toValue(accountId))
ref(client)
.value?.getAccount(toValue(accountId) ?? "")
toValue(client)
?.getAccount(toValue(accountId) ?? "")
.then((res) => {
output.value = res.data;
});

View file

@ -65,26 +65,6 @@ export const useParsedContent = (
link.outerHTML = await renderToString(renderedMention);
}
// Highlight code blocks
/* const codeBlocks = contentHtml.querySelectorAll("pre code");
for (const codeBlock of codeBlocks) {
const code = codeBlock.textContent;
if (!code) {
continue;
}
const highligher = await getShikiHighlighter();
const newCode = highligher.highlight(code, {});
// Replace parent pre tag with highlighted code
const parent = codeBlock.parentElement;
if (!parent) {
continue;
}
parent.outerHTML = newCode;
}*/
result.value = contentHtml.innerHTML;
},
{ immediate: true },