Allow "unsafe" HTML in markdown
This commit is contained in:
parent
44f1cc549f
commit
d38740c493
3 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
local cmark = require 'cmark'
|
||||
local csv = require 'streamcsv'
|
||||
local fun = require 'fun'
|
||||
local json = require 'cjson'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
local cmark = require 'cmark'
|
||||
local restia = require 'restia'
|
||||
local params = require 'params'
|
||||
local yaml = require 'lyaml'
|
||||
|
@ -29,7 +30,7 @@ local function read_post(file)
|
|||
local head, body = restia.utils.frontmatter(content)
|
||||
return {
|
||||
head = head and yaml.load(head) or {};
|
||||
body = cmark.render_html(cmark.parse_document(body, #body, cmark.OPT_DEFAULT), cmark.OPT_DEFAULT);
|
||||
body = cmark.render_html(cmark.parse_document(body, #body, cmark.OPT_DEFAULT), cmark.OPT_DEFAULT + cmark.OPT_UNSAFE);
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ local cpath = path:gsub(".lua", ".so"):gsub("/share/", "/lib/")
|
|||
|
||||
task.build {
|
||||
description = "Builds the page";
|
||||
'mkdir -p .luarocks lua_modules';
|
||||
'luarocks install --only-deps *.rockspec';
|
||||
'tup';
|
||||
'rm -rf blog/*';
|
||||
|
|
Loading…
Reference in a new issue