Files
fes/core/markdown.lua
2025-11-19 21:45:36 -05:00

20 lines
489 B
Lua

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