Format js bindings
This commit is contained in:
parent
b96a85ee11
commit
a67ff23959
|
@ -246,15 +246,15 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if hoverTarget.code}
|
{#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
|
<CodeEditor
|
||||||
value={hoverTarget.code?.trim()}
|
value={hoverTarget.code?.trim()}
|
||||||
mode={EditorModes.JS}
|
mode={EditorModes.JS}
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
{:else if mode === BindingMode.Text}
|
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
|
|
||||||
<pre>{@html hoverTarget.code}</pre>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue