Skip to content

Commit 538dac1

Browse files
committed
change: escape % pattern for blockwise
fixes #187
1 parent 1855716 commit 538dac1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/Comment/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function U.commenter(left, right, padding, scol, ecol)
230230
line[1] = sfirst .. ll .. slast
231231
line[#line] = efirst .. rr .. elast
232232
else
233-
line[1] = U.is_empty(first) and left or string.gsub(first, '^(%s*)', '%1' .. ll)
233+
line[1] = U.is_empty(first) and left or string.gsub(first, '^(%s*)', '%1' .. vim.pesc(ll))
234234
line[#line] = U.is_empty(last) and right or (last .. rr)
235235
end
236236
return line

0 commit comments

Comments
 (0)