diff options
author | Horacio Sanson <hsanson@gmail.com> | 2020-07-30 09:45:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 09:45:13 +0900 |
commit | e03e24c091c601a821379d259191583b39bcf23e (patch) | |
tree | c32dffa16ad2b90a88dbc4e7b75a4e255dbf4f1b /autoload | |
parent | 5338dbf680f7095f86fb29a9a03f3ed243600439 (diff) | |
parent | 7cada95683ce025a877aaaec846af3f80ede31b5 (diff) | |
download | ale-e03e24c091c601a821379d259191583b39bcf23e.zip |
Merge pull request #3253 from sblask/support-markdownlint-0.19.0-and-0.22.0
Support markdownlint 0.19.0 and 0.22.0
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/markdownlint.vim | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/autoload/ale/handlers/markdownlint.vim b/autoload/ale/handlers/markdownlint.vim index daaa1d66..5cef20ee 100644 --- a/autoload/ale/handlers/markdownlint.vim +++ b/autoload/ale/handlers/markdownlint.vim @@ -2,15 +2,22 @@ " Description: Adds support for markdownlint function! ale#handlers#markdownlint#Handle(buffer, lines) abort - let l:pattern=': \(\d*\): \(MD\d\{3}\)\(\/\)\([A-Za-z0-9-]\+\)\(.*\)$' + let l:pattern=': \?\(\d\+\)\(:\(\d\+\)\?\)\? \(MD\d\{3}/[A-Za-z0-9-]\+\) \(.*\)$' let l:output=[] for l:match in ale#util#GetMatches(a:lines, l:pattern) - call add(l:output, { + let l:result = ({ \ 'lnum': l:match[1] + 0, - \ 'text': '(' . l:match[2] . l:match[3] . l:match[4] . ')' . l:match[5], + \ 'code': l:match[4], + \ 'text': l:match[5], \ 'type': 'W', \}) + + if len(l:match[3]) > 0 + let l:result.col = (l:match[3] + 0) + endif + + call add(l:output, l:result) endfor return l:output |