File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,19 @@ function! s:Cmd() abort
28
28
endfunction
29
29
30
30
" Build the URL stub
31
- let s: stub = get (g: , " devdocs_open_command" , <SID> Cmd ()) . " 'https://devdocs.io/#q="
31
+ let s: URL = " https://devdocs.io/#q="
32
+ let s: stub = get (g: , " devdocs_open_command" , <SID> Cmd ()) . ' '
32
33
33
34
" Build the full URL
34
35
function ! s: DD (args , ... ) abort
35
36
let query = " "
36
37
37
38
if len (split (a: args , " " )) == 0
38
- let query = s: stub . ( a: 1 == " !" || get (g: , " devdocs_enable_scoping" , 0 ) == 1 ? ' ' : &filetype . " %20" ) . expand (" <cword>" ) . " ' "
39
+ let query = s: stub . shellescape ( s: URL . ( a: 1 == " !" || get (g: , " devdocs_enable_scoping" , 0 ) == 1 ? ' ' : &filetype . " %20" ) . expand (" <cword>" ))
39
40
elseif len (split (a: args , " " )) == 1
40
- let query = s: stub . ( a: 1 == " !" || get (g: , " devdocs_enable_scoping" , 0 ) == 1 ? ' ' : &filetype . " %20" ) . a: args . " ' "
41
+ let query = s: stub . shellescape ( s: URL . ( a: 1 == " !" || get (g: , " devdocs_enable_scoping" , 0 ) == 1 ? ' ' : &filetype . " %20" ) . a: args)
41
42
else
42
- let query = s: stub . substitute (a: args , ' \s\+' , ' %20' , ' g' ) . " ' "
43
+ let query = s: stub . shellescape ( s: URL . substitute (a: args , ' \s\+' , ' %20' , ' g' ))
43
44
endif
44
45
45
46
return query
You can’t perform that action at this time.
0 commit comments