mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
fix: 🐛 Various bugfixes
This commit is contained in:
parent
52c1f1c57f
commit
6d2b607f2b
10 changed files with 76 additions and 111 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue