File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
29
29
30
30
- Setting: ` devproxytoolkit.versionPreference ` renamed to ` dev-proxy-toolkit.version `
31
31
32
+ ### Fixed:
33
+
34
+ - Code Lens: Fixed issue with documentation link shown for plugins with invalid names
35
+
32
36
## [ 0.8.0] - 2024-09-06
33
37
34
38
### Changed:
Original file line number Diff line number Diff line change 1
1
import * as vscode from 'vscode' ;
2
2
import { isConfigFile , getASTNode , getRangeFromASTNode } from './helpers' ;
3
3
import parse from 'json-to-ast' ;
4
+ import { pluginSnippets } from './constants' ;
4
5
5
6
export const registerCodeLens = ( context : vscode . ExtensionContext ) => {
6
7
context . subscriptions . push (
@@ -49,13 +50,17 @@ export const createCodeLensForPluginNodes = (document: vscode.TextDocument) => {
49
50
const pluginName = ( pluginNameNode ?. value as parse . LiteralNode )
50
51
. value as string ;
51
52
52
- codeLens . push (
53
- new vscode . CodeLens ( getRangeFromASTNode ( pluginNameNode ) , {
54
- title : `📄 ${ pluginName } ` ,
55
- command : 'dev-proxy-toolkit.openPluginDoc' ,
56
- arguments : [ pluginName ] ,
57
- } )
58
- ) ;
53
+ const isValidName = pluginSnippets [ pluginName ] ;
54
+
55
+ if ( isValidName ) {
56
+ codeLens . push (
57
+ new vscode . CodeLens ( getRangeFromASTNode ( pluginNameNode ) , {
58
+ title : `📄 ${ pluginName } ` ,
59
+ command : 'dev-proxy-toolkit.openPluginDoc' ,
60
+ arguments : [ pluginName ] ,
61
+ } )
62
+ ) ;
63
+ }
59
64
} ) ;
60
65
}
61
66
}
You can’t perform that action at this time.
0 commit comments