Skip to content

Commit 64239d8

Browse files
committed
feat: add strikethrough
1 parent d4442ed commit 64239d8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/bytemd/src/Element.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
<strong>
2828
<svelte:self items={children} />
2929
</strong>
30+
{:else if type === 'delete'}
31+
<del>
32+
<svelte:self items={children} />
33+
</del>
3034
{:else if type === 'inlineCode'}
3135
<code>{value}</code>
3236
{:else if type === 'heading'}

packages/bytemd/src/Toolbar.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
function handleItalic() {
1818
return handleDec('*');
1919
}
20+
function handleStrikethrough() {
21+
return handleDec('~~');
22+
}
2023
function handleBlockquote() {}
2124
</script>
2225

@@ -31,5 +34,7 @@
3134
<div>
3235
<button on:click={handleBold}>bold</button>
3336
<button on:click={handleItalic}>italic</button>
37+
<button on:click={handleStrikethrough}>strikethrough</button>
3438
<button on:click={handleBlockquote}>blockquote</button>
39+
3540
</div>

0 commit comments

Comments
 (0)