Compare commits
2 commits
build/nix-
...
fix/asciid
| Author | SHA1 | Date | |
|---|---|---|---|
| 454030ad78 | |||
| a2ef9a828f |
3 changed files with 4 additions and 2 deletions
|
|
@ -162,6 +162,7 @@ function M.compile(bufnr, name, provider, ctx, opts)
|
|||
|
||||
if
|
||||
provider.open
|
||||
and not opts.oneshot
|
||||
and not opened[bufnr]
|
||||
and output_file ~= ''
|
||||
and vim.uv.fs_stat(output_file)
|
||||
|
|
@ -240,6 +241,7 @@ function M.compile(bufnr, name, provider, ctx, opts)
|
|||
end
|
||||
if
|
||||
provider.open
|
||||
and not opts.oneshot
|
||||
and not opened[bufnr]
|
||||
and output_file ~= ''
|
||||
and vim.uv.fs_stat(output_file)
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ M.asciidoctor = {
|
|||
ft = 'asciidoc',
|
||||
cmd = { 'asciidoctor' },
|
||||
args = function(ctx)
|
||||
return { ctx.file, '-o', ctx.output }
|
||||
return { '--failure-level', 'ERROR', ctx.file, '-o', ctx.output }
|
||||
end,
|
||||
output = function(ctx)
|
||||
return (ctx.file:gsub('%.adoc$', '.html'))
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ describe('presets', function()
|
|||
|
||||
it('returns args with file and output', function()
|
||||
assert.are.same(
|
||||
{ '/tmp/document.adoc', '-o', '/tmp/document.html' },
|
||||
{ '--failure-level', 'ERROR', '/tmp/document.adoc', '-o', '/tmp/document.html' },
|
||||
presets.asciidoctor.args(adoc_ctx)
|
||||
)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue