diff --git a/lua/preview/presets.lua b/lua/preview/presets.lua index 1f333bf..6a3a000 100644 --- a/lua/preview/presets.lua +++ b/lua/preview/presets.lua @@ -224,7 +224,7 @@ M.markdown = { ft = 'markdown', cmd = { 'pandoc' }, args = function(ctx) - return { ctx.file, '-s', '--embed-resources', '--mathml', '-o', ctx.output } + return { ctx.file, '-s', '--katex', '-o', ctx.output } end, output = function(ctx) return (ctx.file:gsub('%.md$', '.html')) @@ -249,8 +249,7 @@ M.github = { 'gfm', ctx.file, '-s', - '--embed-resources', - '--mathml', + '--katex', '--css', 'https://cdn.jsdelivr.net/gh/pixelbrackets/gfm-stylesheet@master/dist/gfm.css', '-o', diff --git a/spec/presets_spec.lua b/spec/presets_spec.lua index 573b1ef..c58102e 100644 --- a/spec/presets_spec.lua +++ b/spec/presets_spec.lua @@ -294,11 +294,11 @@ describe('presets', function() assert.are.same({ 'pandoc' }, presets.markdown.cmd) end) - it('returns args with standalone, embed-resources, and mathml flags', function() + it('returns args with standalone and katex flags', function() local args = presets.markdown.args(md_ctx) assert.is_table(args) assert.are.same( - { '/tmp/document.md', '-s', '--embed-resources', '--mathml', '-o', '/tmp/document.html' }, + { '/tmp/document.md', '-s', '--katex', '-o', '/tmp/document.html' }, args ) end) @@ -382,7 +382,7 @@ describe('presets', function() assert.are.same({ 'pandoc' }, presets.github.cmd) end) - it('returns args with standalone, embed-resources, mathml, and css flags', function() + it('returns args with standalone, katex, and css flags', function() local args = presets.github.args(md_ctx) assert.is_table(args) assert.are.same({ @@ -390,8 +390,7 @@ describe('presets', function() 'gfm', '/tmp/document.md', '-s', - '--embed-resources', - '--mathml', + '--katex', '--css', 'https://cdn.jsdelivr.net/gh/pixelbrackets/gfm-stylesheet@master/dist/gfm.css', '-o',