Loading md_to_docx_converter/md_to_html_2.lua +5 −5 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ end --helper function that uses the generated toc to link clauses and figures to the respetive header function Substitute(el, word) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" if word == "annex" then pattern = "(%u)" end local pattern = "(%w*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d+%-?%d*)" -- if word == "annex" then -- pattern = "(%u)" -- end local i = 1 while el.content[i] do Loading Loading @@ -120,7 +120,7 @@ end function MultipleClauses(el) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" local pattern = "(%w*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d+%-?%d*)" local clausesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local i = 1 Loading Loading
md_to_docx_converter/md_to_html_2.lua +5 −5 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ end --helper function that uses the generated toc to link clauses and figures to the respetive header function Substitute(el, word) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" if word == "annex" then pattern = "(%u)" end local pattern = "(%w*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d+%-?%d*)" -- if word == "annex" then -- pattern = "(%u)" -- end local i = 1 while el.content[i] do Loading Loading @@ -120,7 +120,7 @@ end function MultipleClauses(el) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" local pattern = "(%w*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d*%.?%d+%-?%d*)" local clausesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local i = 1 Loading