Skip to content

Commit 392961f

Browse files
authored
fix(css): invalid line comment on empty lines (#72)
Note: This is a general problem with languages with linewise comment which have both left and right sides.
1 parent 7627727 commit 392961f

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 @@ end
230230
---@return string string Commented string
231231
function U.comment_str(ln, lcs, rcs, padding, min_indent)
232232
if U.is_empty(ln) then
233-
return (min_indent or '') .. (lcs or rcs)
233+
return (min_indent or '') .. ((lcs or '') .. (rcs or ''))
234234
end
235235

236236
local indent, chars = ln:match('^(%s*)(.*)')

0 commit comments

Comments
 (0)