This commit is contained in:
2025-11-19 21:45:36 -05:00
parent 5cfaddf479
commit aab31daa2e
9 changed files with 103 additions and 27 deletions

19
core/markdown.lua Normal file
View File

@@ -0,0 +1,19 @@
local M = {}
-- Markdown to HTML conversion function
-- Uses the Go backend markdown parser
function M.to_html(markdown_text)
markdown_text = markdown_text or ""
-- Get the fes module
local fes_mod = package.loaded.fes
if fes_mod and fes_mod.markdown_to_html then
return fes_mod.markdown_to_html(markdown_text)
end
-- Fallback: return error message if Go function not available
return "<p>Error: markdown_to_html function not available</p>"
end
return M