@@ -19,7 +19,7 @@ export function nodeDataToUri(nodeData: Node): vscode.Uri {
1919 bundledAssemblyName
2020 ? `${ assemblyFile } ;${ bundledAssemblyName } `
2121 : assemblyFile ,
22- ":" ,
22+ ":: " ,
2323 nodeData . metadata ?. name ?? ""
2424 )
2525 ) . with ( {
@@ -29,7 +29,7 @@ export function nodeDataToUri(nodeData: Node): vscode.Uri {
2929 nodeData . metadata ?. type ,
3030 nodeData . metadata ?. parentSymbolToken ,
3131 nodeData . metadata ?. isDecompilable ? "1" : "0" ,
32- ] . join ( ": " ) ,
32+ ] . join ( ", " ) ,
3333 } ) ;
3434}
3535
@@ -38,7 +38,7 @@ export function uriToNode(uri: vscode.Uri): NodeMetadata | undefined {
3838 return undefined ;
3939 }
4040
41- const assemblyPathAndNameParts = uri . fsPath . split ( ":" ) ;
41+ const assemblyPathAndNameParts = uri . fsPath . split ( ":: " ) ;
4242 const name =
4343 assemblyPathAndNameParts . length > 1 ? assemblyPathAndNameParts [ 1 ] : "" ;
4444
@@ -48,7 +48,7 @@ export function uriToNode(uri: vscode.Uri): NodeMetadata | undefined {
4848 assemblyPathParts . length > 1 ? assemblyPathParts [ 1 ] : undefined ;
4949
5050 const [ symbolToken , type , parentSymbolToken , isDecompilable ] =
51- uri . query . split ( ": " ) ;
51+ uri . query . split ( ", " ) ;
5252 return {
5353 assemblyPath : trimTrailingSlashes ( assembly ) ,
5454 bundledAssemblyName : bundledAssemblyName
@@ -62,18 +62,26 @@ export function uriToNode(uri: vscode.Uri): NodeMetadata | undefined {
6262 } ;
6363}
6464
65+ // function trimLeadingSlashes(input: string) {
66+ // let result = input;
67+ // if (result.startsWith(path.sep)) {
68+ // result = result.substring(1);
69+ // }
70+ // return result;
71+ // }
72+
73+ // function trimTrailingSlashes(input: string) {
74+ // let result = input;
75+ // if (result.endsWith(path.sep)) {
76+ // result = result.slice(0, -1);
77+ // }
78+ // return result;
79+ // }
80+
6581function trimLeadingSlashes ( input : string ) {
66- let result = input ;
67- if ( result . startsWith ( path . sep ) ) {
68- result = result . substring ( 1 ) ;
69- }
70- return result ;
82+ return input . replace ( / ^ [ \\ / ] + / , "" ) ;
7183}
7284
7385function trimTrailingSlashes ( input : string ) {
74- let result = input ;
75- if ( result . endsWith ( path . sep ) ) {
76- result = result . slice ( 0 , - 1 ) ;
77- }
78- return result ;
86+ return input . replace ( / [ \\ / ] + $ / , "" ) ;
7987}
0 commit comments