Skip to content

Commit

Permalink
feat: Make doge#token#replace_string a local script function
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed May 5, 2019
1 parent a9559fa commit 88b34d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/doge/token.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
let s:save_cpo = &cpoptions
set cpoptions&vim

function! doge#token#replace_string(tokens, text) abort
function! s:token_replace(tokens, text) abort
" Ensure the input is a string.
if type(a:text) != type('')
return a:text
Expand Down Expand Up @@ -85,9 +85,9 @@ endfunction
function! doge#token#replace(tokens, text) abort
let l:text = deepcopy(a:text)
if type(l:text) == type([])
return map(l:text, {key, line -> doge#token#replace_string(a:tokens, line)})
return map(l:text, {key, line -> <SID>token_replace(a:tokens, line)})
elseif type(l:text) == type('')
return doge#token#replace_string(a:tokens, l:text)
return <SID>token_replace(a:tokens, l:text)
endif
endfunction

Expand Down

0 comments on commit 88b34d5

Please sign in to comment.