Skip to content

Commit

Permalink
feat(export.markdown): option to export latex embed tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ALVAROPING1 authored and vhyrro committed Jan 6, 2024
1 parent 55625a0 commit 0abe7b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/neorg/modules/core/export/markdown/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ module.load = function()
"definition-lists",
"mathematics",
"metadata",
"latex",
}
end

Expand All @@ -162,7 +163,7 @@ module.config.public = {
-- default no extensions are loaded (the exporter is commonmark compliant).
-- You can also set this value to `"all"` to enable all extensions.
-- The full extension list is: `todo-items-basic`, `todo-items-pending`, `todo-items-extended`,
-- `definition-lists`, `mathematics` and `metadata`.
-- `definition-lists`, `mathematics`, `metadata` and `latex`.
extensions = {},

-- Data about how to render mathematics.
Expand Down Expand Up @@ -417,7 +418,7 @@ module.public = {
text == "embed"
and node:next_named_sibling()
and vim.tbl_contains(
{ "markdown", "html" },
{ "markdown", "html", module.config.public.extensions["latex"] and "latex" or nil },
module.required["core.integrations.treesitter"].get_node_text(node:next_named_sibling())
)
then
Expand Down

0 comments on commit 0abe7b7

Please sign in to comment.