1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-22 07:38:52 -05:00

Merge branch 'feature/markdown-tooling-fixes' into premerge

This commit is contained in:
Jonas Schäfer 2021-03-04 18:02:28 +01:00
commit 2b5ee06703

View File

@ -69,11 +69,12 @@ function Doc(body, metadata, variables)
if field == "legal" then
add("&LEGALNOTICE;");
goto next;
elseif field == "supersedes" or field == "supersededby" then
elseif field == "supersedes" or field == "supersededby" or field == "dependencies" then
add(("<%s/>"):format(field));
goto next;
elseif r ~= "*" and r ~= "?" then
error(string.format("Missing required metadata field '%s'", field));
io.stderr:write(string.format("Missing REQUIRED metadata field '%s'\n", field));
goto next;
else
io.stderr:write(string.format("Missing optional metadata field '%s'\n", field));
goto next;
@ -138,6 +139,7 @@ end
-- Comments indicate the types of other variables.
function Str(s)
if string.match(s, "^&[%w%-.]+;$") then return s; end
return escape(s)
end