30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
end
if not mode['render:format'] then
error 'what output format should i translate the input to?'
end
if mode['render:format'] == 'none' then return 0 end
if not ct.render[mode['render:format']] then
ct.exns.unimpl('output format ā%sā unsupported', mode['render:format']):throw()
end
local render_opts = ss.kmap(function(k,v)
return k:sub(2+#mode['render:format'])
end, ss.kfilter(mode, function(m)
return ss.str.begins(m, mode['render:format']..':')
end))
|
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
end
if not mode['render:format'] then
error 'what output format should i translate the input to?'
end
if mode['render:format'] == 'none' then return 0 end
if not ct.render[mode['render:format']] then
if (not ct.render.html) and not _G.native then
-- we may be running uncompiled; otherwise something is seriously broken
require('render.' .. mode['render:format'])
else
ct.exns.unimpl('output format ā%sā unsupported', mode['render:format']):throw()
end
end
local render_opts = ss.kmap(function(k,v)
return k:sub(2+#mode['render:format'])
end, ss.kfilter(mode, function(m)
return ss.str.begins(m, mode['render:format']..':')
end))
|