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
|
if
|
||||||
provider.open
|
provider.open
|
||||||
|
and not opts.oneshot
|
||||||
and not opened[bufnr]
|
and not opened[bufnr]
|
||||||
and output_file ~= ''
|
and output_file ~= ''
|
||||||
and vim.uv.fs_stat(output_file)
|
and vim.uv.fs_stat(output_file)
|
||||||
|
|
@ -240,6 +241,7 @@ function M.compile(bufnr, name, provider, ctx, opts)
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
provider.open
|
provider.open
|
||||||
|
and not opts.oneshot
|
||||||
and not opened[bufnr]
|
and not opened[bufnr]
|
||||||
and output_file ~= ''
|
and output_file ~= ''
|
||||||
and vim.uv.fs_stat(output_file)
|
and vim.uv.fs_stat(output_file)
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ M.asciidoctor = {
|
||||||
ft = 'asciidoc',
|
ft = 'asciidoc',
|
||||||
cmd = { 'asciidoctor' },
|
cmd = { 'asciidoctor' },
|
||||||
args = function(ctx)
|
args = function(ctx)
|
||||||
return { ctx.file, '-o', ctx.output }
|
return { '--failure-level', 'ERROR', ctx.file, '-o', ctx.output }
|
||||||
end,
|
end,
|
||||||
output = function(ctx)
|
output = function(ctx)
|
||||||
return (ctx.file:gsub('%.adoc$', '.html'))
|
return (ctx.file:gsub('%.adoc$', '.html'))
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,7 @@ describe('presets', function()
|
||||||
|
|
||||||
it('returns args with file and output', function()
|
it('returns args with file and output', function()
|
||||||
assert.are.same(
|
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)
|
presets.asciidoctor.args(adoc_ctx)
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue