diff --git a/tools/2xep.lua b/tools/2xep.lua index 34c46902..cdf8b8fd 100644 --- a/tools/2xep.lua +++ b/tools/2xep.lua @@ -126,7 +126,7 @@ function Doc(body, metadata, variables) end add(""); add(body) - for i = 1, #sectionstack do + for i = #sectionstack, 1, -1 do add(""); end add("\n");