1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-07-24 01:29:48 +02:00
This commit is contained in:
lxsang
2020-09-13 15:41:42 +02:00
3 changed files with 13 additions and 19 deletions

View File

@ -123,7 +123,12 @@ function DocController:index(...)
end
if path and ulib.exists(path) then
local file = io.open(path, "r")
local content = file:read("*a")
local content = ""
local md = require("md")
local callback = function(s)
content = content..s
end
md.to_html(file:read("*a"), callback)
file.close()
-- replace some display plugins
content = pre_process_md(content, self)