Loading .gitignore +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ media saved_files official editing .venv .vscode # OUTPUT FILES background_highlight.css Loading API.docx +760 KiB (8.25 MiB) File changed.No diff preview for this file type. View original file View changed file filter_2.lua +4 −4 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ end function MultipleClauses(el) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" local calusesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local clausesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local i = 1 while el.content[i] do Loading @@ -125,12 +125,12 @@ function MultipleClauses(el) if elem.t == "Str" then --this may be the start of a list of multiple clauses if elem.text:lower():find("clauses") then calusesFound = true clausesFound = true newContent:insert(elem) goto continue end if calusesFound then if clausesFound then --check if we found a clause number local startIndex, endIndex, number = elem.text:find(pattern) Loading @@ -149,7 +149,7 @@ function MultipleClauses(el) else --we found something that is neither a comma, the word 'and' or a clause number, --so we can say this is not a list of multiple clauses calusesFound = false clausesFound = false end end end Loading Loading
.gitignore +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ media saved_files official editing .venv .vscode # OUTPUT FILES background_highlight.css Loading
API.docx +760 KiB (8.25 MiB) File changed.No diff preview for this file type. View original file View changed file
filter_2.lua +4 −4 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ end function MultipleClauses(el) local newContent = pandoc.List({}) local pattern = "(%w*%.?%d*%.?%d*%.?%d+%-?%d*)" local calusesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local clausesFound = false --this is true when we found the word "clauses" and remain true until we habe clauses numbers following local i = 1 while el.content[i] do Loading @@ -125,12 +125,12 @@ function MultipleClauses(el) if elem.t == "Str" then --this may be the start of a list of multiple clauses if elem.text:lower():find("clauses") then calusesFound = true clausesFound = true newContent:insert(elem) goto continue end if calusesFound then if clausesFound then --check if we found a clause number local startIndex, endIndex, number = elem.text:find(pattern) Loading @@ -149,7 +149,7 @@ function MultipleClauses(el) else --we found something that is neither a comma, the word 'and' or a clause number, --so we can say this is not a list of multiple clauses calusesFound = false clausesFound = false end end end Loading