diff options
Diffstat (limited to 'ale_linters/yaml/swaglint.vim')
-rw-r--r-- | ale_linters/yaml/swaglint.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ale_linters/yaml/swaglint.vim b/ale_linters/yaml/swaglint.vim index 454cad05..75a496c5 100644 --- a/ale_linters/yaml/swaglint.vim +++ b/ale_linters/yaml/swaglint.vim @@ -27,6 +27,14 @@ function! ale_linters#yaml#swaglint#Handle(buffer, lines) abort \ 'text': l:match[4], \} + " Parse the code if it's there. + let l:code_match = matchlist(l:obj.text, '\v^(.+) \(([^ (]+)\)$') + + if !empty(l:code_match) + let l:obj.text = l:code_match[1] + let l:obj.code = l:code_match[2] + endif + call add(l:output, l:obj) endfor |