This repository was archived by the owner on Jun 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ function decoration(
4848 const currentVersion = item . value ;
4949 const hasLatest = satisfies ( versions [ 0 ] , currentVersion || "0.0.0" ) ;
5050
51- const hoverMessage = error ? new MarkdownString ( `**${ error } **` ) : new MarkdownString ( `**Available Versions**` ) ;
51+ const hoverMessage = error ? new MarkdownString ( `**${ error } **` ) : new MarkdownString ( `### Docs` ) ;
52+ hoverMessage . appendMarkdown ( `\n * [Latest](https://docs.rs/crate/${ item . key } /${ versions [ 0 ] } )` ) ;
53+ hoverMessage . appendMarkdown ( `\n * [Current](https://docs.rs/crate/${ item . key } /${ currentVersion } ) \n\n` ) ;
54+ hoverMessage . appendMarkdown ( "### Available Versions" ) ;
5255 hoverMessage . isTrusted = true ;
5356
5457 if ( versions . length > 0 ) {
@@ -67,7 +70,7 @@ function decoration(
6770 end,
6871 } ;
6972 const encoded = encodeURI ( JSON . stringify ( replaceData ) ) ;
70- const command = `[${ version } ](command:crates.replaceVersion?${ encoded } )` ;
73+ const command = `[${ version } ](command:crates.replaceVersion?${ encoded } ) [ (docs)](https://docs.rs/crate/ ${ item . key } / ${ version } ) ` ;
7174 hoverMessage . appendMarkdown ( "\n * " ) ;
7275 hoverMessage . appendMarkdown ( command ) ;
7376 }
You can’t perform that action at this time.
0 commit comments