Merge branch 'master' into test-speedup

This commit is contained in:
Sam Rose 2025-03-05 13:31:59 +00:00 committed by GitHub
commit 735ec39cfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "3.4.23",
"version": "3.4.24",
"npmClient": "yarn",
"concurrency": 20,
"command": {

View File

@ -145,9 +145,11 @@
return
}
popoverAnchor = target
const doc = new DOMParser().parseFromString(helper.description, "text/html")
hoverTarget = {
type: "helper",
description: helper.description,
description: doc.body.textContent || "",
code: getHelperExample(helper, mode === BindingMode.JavaScript),
}
popover.show()
@ -241,20 +243,19 @@
>
{#if hoverTarget.description}
<div>
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html hoverTarget.description}
{hoverTarget.description}
</div>
{/if}
{#if hoverTarget.code}
{#if mode === BindingMode.JavaScript}
{#if mode === BindingMode.Text || (mode === BindingMode.JavaScript && hoverTarget.type === "binding")}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
<pre>{@html hoverTarget.code}</pre>
{:else}
<CodeEditor
value={hoverTarget.code?.trim()}
mode={EditorModes.JS}
readonly
/>
{:else if mode === BindingMode.Text}
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
<pre>{@html hoverTarget.code}</pre>
{/if}
{/if}
</div>