Skip POD comments
This commit is contained in:
parent
4bae3d4618
commit
0f918d94f6
|
@ -12,6 +12,7 @@ function! s:guess(lines) abort
|
|||
let options = {}
|
||||
let heuristics = {'spaces': 0, 'hard': 0, 'soft': 0}
|
||||
let ccomment = 0
|
||||
let podcomment = 0
|
||||
|
||||
for line in a:lines
|
||||
|
||||
|
@ -29,6 +30,16 @@ function! s:guess(lines) abort
|
|||
continue
|
||||
endif
|
||||
|
||||
if line =~# '^=\w'
|
||||
let podcomment = 1
|
||||
endif
|
||||
if podcomment
|
||||
if line =~# '^=\%(end\|cut\)\>'
|
||||
let podcomment = 0
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
let softtab = repeat(' ', 8)
|
||||
if line =~# '^\t'
|
||||
let heuristics.hard += 1
|
||||
|
|
Loading…
Reference in New Issue