alpha
This commit is contained in:
19
core/markdown.lua
Normal file
19
core/markdown.lua
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user