1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 02:18:20 +01:00

add Youtube support on doc front end

This commit is contained in:
lxsang 2020-09-15 10:29:39 +02:00
parent 4d55b64436
commit 0f1293fb46

View File

@ -44,7 +44,7 @@ local post_process_md = function(str, obj)
local pattern = capture:gsub("%[", "%%["):gsub("%]", "%%]")
if apath then
--apath = utils.urlencode(apath):gsub("%%", "%%%%")
content = str:gsub(pattern,
content = content:gsub(pattern,
"<iframe width=\"100%\" src=\"https://www.youtube.com/embed/"..apath.."\"> </iframe>")
end
end