From 43612117c98b6d5a5ffc1019026745829bdab389 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Tue, 22 Dec 2020 12:42:28 +0100 Subject: [PATCH] Schema: Fix inserted Markdown --- mod.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod.lua b/mod.lua index f815fb0..27f8908 100644 --- a/mod.lua +++ b/mod.lua @@ -106,7 +106,8 @@ function configuration(modname) local modified = false readme = readme:gsub("" .. "(.-)" .. "", 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 "" .. markdown .. ""