Skip to content

Commit

Permalink
fix(latex-renderer): handle broken latex (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored May 28, 2024
1 parent aa47d93 commit 8140135
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lua/neorg/modules/core/latex/renderer/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,16 @@ local function render_latex()
render_timer = nil

if not running_proc then
running_proc = nio.run(function()
nio.scheduler()
module.public.async_latex_renderer(buf)
end, function()
module.public.render_inline_math(module.private.latex_images[buf] or {}, buf)
running_proc = nil
end)
running_proc = nio.run(
function()
nio.scheduler()
module.public.async_latex_renderer(buf)
end,
vim.schedule_wrap(function()
module.public.render_inline_math(module.private.latex_images[buf] or {}, buf)
running_proc = nil
end)
)
end
end)
end
Expand Down

0 comments on commit 8140135

Please sign in to comment.