mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-20 05:14:10 +02:00
Schema: Fix inserted Markdown
This commit is contained in:
parent
5399a0f302
commit
43612117c9
3
mod.lua
3
mod.lua
@ -106,7 +106,8 @@ function configuration(modname)
|
||||
local modified = false
|
||||
readme = readme:gsub("<!%-%-modlib:conf:(%d)%-%->" .. "(.-)" .. "<!%-%-modlib:conf%-%->", function(level, content)
|
||||
schema._md_level = assert(tonumber(level)) + 1
|
||||
local markdown = schema:generate_markdown()
|
||||
-- HACK: Newline between comment and heading (MD implementations don't handle comments properly)
|
||||
local markdown = "\n" .. schema:generate_markdown()
|
||||
if content ~= markdown then
|
||||
modified = true
|
||||
return "<!--modlib:conf:" .. level .. "-->" .. markdown .. "<!--modlib:conf-->"
|
||||
|
Loading…
Reference in New Issue
Block a user