This commit is contained in:
Timothy Jaeryang Baek committed 2026-02-01 20:06:38 -06:00
1 parent 6ffce4bccd
commit 6719558150
2 files changed
+21 -2

No files matched your search

@@ -54,7 +54,9 @@
console.log('Exporting table to CSV'); console.log('Exporting table to CSV');
// Extract header row text, decode HTML entities, and escape for CSV. // Extract header row text, decode HTML entities, and escape for CSV.
const header = token.header.map((headerCell) => `"${decode(headerCell.text).replace(/"/g, '""')}"`); const header = token.header.map(
(headerCell) => `"${decode(headerCell.text).replace(/"/g, '""')}"`
);
// Create an array for rows that will hold the mapped cell text. // Create an array for rows that will hold the mapped cell text.
const rows = token.rows.map((row) => const rows = token.rows.map((row) =>
@@ -316,6 +318,11 @@
</ul> </ul>
{/if} {/if}
{:else if token.type === 'details'} {:else if token.type === 'details'}
{@const textContent = decode(token.text || '')
.replace(/<summary>.*?<\/summary>/gi, '')
.trim()}
{#if textContent.length > 0}
<Collapsible <Collapsible
title={token.summary} title={token.summary}
open={$settings?.expandDetails ?? false} open={$settings?.expandDetails ?? false}
@@ -336,6 +343,16 @@
/> />
</div> </div>
</Collapsible> </Collapsible>
{:else}
<Collapsible
title={token.summary}
open={false}
disabled={true}
attributes={token?.attributes}
className="w-full space-y-1"
dir="auto"
/>
{/if}
{:else if token.type === 'html'} {:else if token.type === 'html'}
<HtmlToken {id} {token} {onSourceClick} /> <HtmlToken {id} {token} {onSourceClick} />
{:else if token.type === 'iframe'} {:else if token.type === 'iframe'}
+3 -1
View File
@@ -222,7 +222,7 @@
<!-- svelte-ignore a11y-no-static-element-interactions --> <!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div <div
class="{buttonClassName} cursor-pointer" class="{buttonClassName} {disabled ? '' : 'cursor-pointer'}"
on:pointerup={() => { on:pointerup={() => {
if (!disabled) { if (!disabled) {
open = !open; open = !open;
@@ -270,6 +270,7 @@
{/if} {/if}
</div> </div>
{#if !disabled}
<div class="flex self-center translate-y-[1px]"> <div class="flex self-center translate-y-[1px]">
{#if open} {#if open}
<ChevronUp strokeWidth="3.5" className="size-3.5" /> <ChevronUp strokeWidth="3.5" className="size-3.5" />
@@ -277,6 +278,7 @@
<ChevronDown strokeWidth="3.5" className="size-3.5" /> <ChevronDown strokeWidth="3.5" className="size-3.5" />
{/if} {/if}
</div> </div>
{/if}
</div> </div>
</div> </div>
{:else} {:else}