File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,12 +34,17 @@ class CommandOpener implements IOpener {
3434 // execute as command
3535 let args : any = [ ] ;
3636 try {
37- args = parse ( target . query ) ;
38- if ( ! Array . isArray ( args ) ) {
39- args = [ args ] ;
37+ args = parse ( decodeURIComponent ( target . query ) ) ;
38+ } catch {
39+ // ignore and retry
40+ try {
41+ args = parse ( target . query ) ;
42+ } catch {
43+ // ignore error
4044 }
41- } catch ( e ) {
42- // ignore error
45+ }
46+ if ( ! Array . isArray ( args ) ) {
47+ args = [ args ] ;
4348 }
4449 await this . _commandService . executeCommand ( target . path , ...args ) ;
4550 return true ;
Original file line number Diff line number Diff line change @@ -289,16 +289,23 @@ export namespace MarkdownString {
289289 if ( ! data ) {
290290 return part ;
291291 }
292+ let changed = false ;
292293 data = cloneAndChange ( data , value => {
293294 if ( URI . isUri ( value ) ) {
294295 const key = `__uri_${ Math . random ( ) . toString ( 16 ) . slice ( 2 , 8 ) } ` ;
295296 bucket [ key ] = value ;
297+ changed = true ;
296298 return key ;
297299 } else {
298300 return undefined ;
299301 }
300302 } ) ;
301- return encodeURIComponent ( JSON . stringify ( data ) ) ;
303+
304+ if ( ! changed ) {
305+ return part ;
306+ }
307+
308+ return JSON . stringify ( data ) ;
302309 }
303310
304311 export function to ( value : htmlContent . IMarkdownString ) : vscode . MarkdownString {
You can’t perform that action at this time.
0 commit comments