replace carta with bun's own api
This commit is contained in:
@@ -46,6 +46,10 @@ export function load({ params }) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
result.descriptionHtml = Bun.markdown.html(
|
||||
result.description || 'No description available.'
|
||||
);
|
||||
|
||||
if (dev) {
|
||||
// pass raw JSON for metadata editor
|
||||
const original = JSON.parse(getOriginalJson(params.stream_id));
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
import { getStreamContext } from '$lib/streamContext.svelte.ts';
|
||||
import { shorthandCode, formatTrackTime, formatDate } from '$lib/utils.ts';
|
||||
import { jumpToTrack } from './Player.svelte';
|
||||
import { Carta } from 'carta-md';
|
||||
import DOMPurify from 'isomorphic-dompurify';
|
||||
|
||||
const carta = new Carta({
|
||||
sanitizer: DOMPurify.sanitize
|
||||
});
|
||||
|
||||
const ctx = getStreamContext();
|
||||
|
||||
@@ -30,7 +24,7 @@
|
||||
</div>
|
||||
|
||||
<div class="description-bubble">
|
||||
{@html carta.renderSSR(ctx.current.description || 'No description available.')}
|
||||
{@html ctx.current.descriptionHtml}
|
||||
</div>
|
||||
|
||||
<div id="table-container">
|
||||
|
||||
Reference in New Issue
Block a user