From d23c346a85c3823acc0e5eaf8462726f51bd4acb Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Sun, 15 Apr 2018 19:48:37 -0600 Subject: [PATCH] tangle: simpler logic for Header --- tangle.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tangle.lua b/tangle.lua index 65a0868..9249bfa 100644 --- a/tangle.lua +++ b/tangle.lua @@ -82,14 +82,10 @@ end --- DefinitionList -function Header(lvl,text) +function Header(h) text = keep_only_lines(text) - if lvl == 1 then + if h.level == 1 or h.level == 2 then return text..'\n\n' - elseif lvl == 2 then - return text..'\n\n' - elseif lvl == 3 then - return text..'\n' else return text..'\n' end