Commit e7502e94 authored by Marco Cavalli's avatar Marco Cavalli
Browse files

fix: update .gitignore to include .venv and .vscode; correct variable name in...

fix: update .gitignore to include .venv and .vscode; correct variable name in MultipleClauses function
parent 16f3e7c5
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ media
saved_files
official
editing
.venv
.vscode

# OUTPUT FILES
background_highlight.css
+760 KiB (8.25 MiB)

File changed.

No diff preview for this file type.

+4 −4
Original line number Diff line number Diff line
@@ -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
@@ -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)

@@ -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