summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-03-20 20:27:50 +0000
committerw0rp <devw0rp@gmail.com>2018-03-20 20:27:50 +0000
commit64c95d4881b9ae7b8e25b65240bb403298db16f8 (patch)
treed313ef40b534844e99a251c7612d77133f5f600a /autoload
parent57a93cbc04de402686494d47bd4147c827383086 (diff)
parent32091fb8ad01d46084305100f4aa074114141516 (diff)
downloadale-64c95d4881b9ae7b8e25b65240bb403298db16f8.zip
Merge remote-tracking branch 'tylucaskelley/master'
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/markdownlint.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/autoload/ale/handlers/markdownlint.vim b/autoload/ale/handlers/markdownlint.vim
new file mode 100644
index 00000000..12fc501c
--- /dev/null
+++ b/autoload/ale/handlers/markdownlint.vim
@@ -0,0 +1,17 @@
+" Author: Ty-Lucas Kelley <tylucaskelley@gmail.com>
+" 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:output=[]
+
+ for l:match in ale#util#GetMatches(a:lines, l:pattern)
+ call add(l:output, {
+ \ 'lnum': l:match[1] + 0,
+ \ 'text': '(' . l:match[2] . l:match[3] . l:match[4] . ')' . l:match[5],
+ \ 'type': 'W',
+ \ })
+ endfor
+
+ return l:output
+endfunction