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

feat: support up to 7 levels of static links

parent 968040d7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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
@@ -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