Skip to content

Commit

Permalink
Preserve whitespace in b:commentary_format
Browse files Browse the repository at this point in the history
Closes #33.
  • Loading branch information
tpope committed Nov 11, 2014
1 parent 401dbd8 commit 9c68513
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugin/commentary.vim
Expand Up @@ -9,9 +9,8 @@ endif
let g:loaded_commentary = 1

function! s:surroundings() abort
return split(substitute(substitute(
\ get(b:, 'commentary_format', &commentstring)
\ ,'\S\zs%s',' %s','') ,'%s\ze\S', '%s ', ''), '%s', 1)
return split(get(b:, 'commentary_format', substitute(substitute(
\ &commentstring, '\S\zs%s',' %s','') ,'%s\ze\S', '%s ', '')), '%s', 1)
endfunction

function! s:go(type,...) abort
Expand Down

0 comments on commit 9c68513

Please sign in to comment.