mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-07-24 01:29:48 +02:00
use backend markdown renderer
This commit is contained in:
@ -105,7 +105,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()
|
||||
self.template:setView("index", "index")
|
||||
self.template:set("data", content)
|
||||
|
Reference in New Issue
Block a user