Skip to content

Commit f8238d7

Browse files
committed
Use React friendly nesting variant
Closes #117
1 parent 3e5d04d commit f8238d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/commentary.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function! s:go(...) abort
5454
let line = getline(lnum)
5555
if strlen(r) > 2 && l.r !~# '\\'
5656
let line = substitute(line,
57-
\'\M'.r[0:-2].'\zs\d\*\ze'.r[-1:-1].'\|'.l[0].'\zs\d\*\ze'.l[1:-1],
57+
\'\M' . substitute(l, '\ze\S\s*$', '\\zs\\d\\*\\ze', '') . '\|' . substitute(r, '\S\zs', '\\zs\\d\\*\\ze', ''),
5858
\'\=substitute(submatch(0)+1-uncomment,"^0$\\|^-\\d*$","","")','g')
5959
endif
6060
if uncomment

0 commit comments

Comments
 (0)