mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 04:53:51 -05:00
Fix detecting indentation in some CSS
This is done by ignoring lines that don't have any
alphanumeric characters, e.g. following would be detected
as 4-spaces indentation instead of 2-spaces
.android {
height: 404px; width: 334px;
margin: 100px auto;
}
https://github.com/tpope/vim-sleuth/issues/22
This commit is contained in:
@@ -36,7 +36,7 @@ function! s:guess(lines) abort
|
||||
let spaces_minus_tabs = 0
|
||||
|
||||
for line in a:lines
|
||||
if !len(line) || line =~# '^\s*$'
|
||||
if !len(line) || line =~# '^\W*$'
|
||||
continue
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user