mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Update Code.svelte
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { HighlightAuto , LineNumbers } from 'svelte-highlight'
|
import { HighlightAuto } from 'svelte-highlight'
|
||||||
|
|
||||||
// Import both dark and light styles
|
// Import both dark and light styles
|
||||||
import { github, githubDark } from 'svelte-highlight/styles/index'
|
import { github, githubDark } from 'svelte-highlight/styles/index'
|
||||||
@@ -55,8 +55,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="code-block is-relative">
|
<div class="code-block is-relative">
|
||||||
<button class="button is-light is-outlined is-small p-2" on:click={copyFunction}>Copy</button>
|
<button class="button is-light is-outlined is-small p-2" on:click={copyFunction}>Copy</button>
|
||||||
<HighlightAuto code={text} let:highlighted>
|
<HighlightAuto code={text} />
|
||||||
<LineNumbers {highlighted} />
|
|
||||||
</HighlightAuto>
|
</HighlightAuto>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user