mirror of
https://github.com/dense-analysis/ale
synced 2024-12-18 04:15:39 +00:00
36fcb01e05
Utilize pandoc to fix markdown files, currently set to Github-Flavored Markdown, but that can be changed by setting, ale_markdown_pandoc_options.
24 lines
642 B
Plaintext
24 lines
642 B
Plaintext
Before:
|
|
Save g:ale_markdown_pandoc_executable
|
|
Save g:ale_markdown_pandoc_options
|
|
|
|
After:
|
|
Restore
|
|
|
|
Execute(The pandoc callback should return 'pandoc' as default command):
|
|
setlocal noexpandtab
|
|
Assert
|
|
\ ale#fixers#pandoc#Fix(bufnr('')).command =~# '^' . ale#Escape('pandoc'),
|
|
\ "Default command name is expected to be 'pandoc'"
|
|
|
|
Execute(The pandoc executable and options should be configurable):
|
|
let g:ale_markdown_pandoc_executable = 'foobar'
|
|
let g:ale_markdown_pandoc_options = '--some-option'
|
|
|
|
AssertEqual
|
|
\ {
|
|
\ 'command': ale#Escape('foobar')
|
|
\ . ' --some-option',
|
|
\ },
|
|
\ ale#fixers#pandoc#Fix(bufnr(''))
|