diff --git a/svelte/src/lib/components/crate-sidebar/InstallInstructions.svelte b/svelte/src/lib/components/crate-sidebar/InstallInstructions.svelte index 850bad3e7cb..e3b3282d6cb 100644 --- a/svelte/src/lib/components/crate-sidebar/InstallInstructions.svelte +++ b/svelte/src/lib/components/crate-sidebar/InstallInstructions.svelte @@ -25,6 +25,11 @@ let exact = exactVersion ? '=' : ''; return `${crate} = "${exact}${v}"`; }); + + let versionOnly = $derived.by(() => { + let v = version.split('+', 1)[0]; + return exactVersion ? `=${v}` : v; + });
{tomlSnippet}
{/if}
+
+ Or copy just the version:
+ + {#if isClipboardSupported} +{versionOnly}
+ {/if}
{/if}