Skip to content

Commit 8cdbbaf

Browse files
committed
Do not remove comments from property values
As of spec 0.15.0, `;` and `#` do not start comments when used in property values, and `\` does not escape `;` or `#`. Remove the relevant code.
1 parent 77fa19f commit 8cdbbaf

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

autoload/editorconfig_core/ini.vim

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,6 @@ function! s:parse(config_filename, target_filename, lines)
155155
echom printf('Saw raw opt <%s>=<%s>', l:optname, l:optval)
156156
endif
157157

158-
if l:optval =~# '\v[;#]'
159-
" ';' and '#' are comment delimiters only if
160-
" preceded by a spacing character
161-
let l:m = matchlist(l:optval, '\v(.{-})\s[;#]')
162-
if len(l:m)
163-
let l:optval = l:m[1]
164-
endif
165-
166-
" ; and # can be escaped with backslash.
167-
let l:optval = substitute(l:optval, '\v\\([;#])', '\1', 'g')
168-
169-
endif
170158
let l:optval = editorconfig_core#util#strip(l:optval)
171159
" allow empty values
172160
if l:optval ==? '""'

0 commit comments

Comments
 (0)