From 28567ef3834c8675196c27d4a5b57065bceb5f7f Mon Sep 17 00:00:00 2001 From: Qieerb Date: Fri, 23 Mar 2018 09:57:05 +0000 Subject: Remove function no longer used (#168) --- FMark/src/Common/TOCite/TOCite.fs | 15 +++++---------- FMark/src/Common/TOCite/TOCiteTest.fs | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'FMark') diff --git a/FMark/src/Common/TOCite/TOCite.fs b/FMark/src/Common/TOCite/TOCite.fs index 88d6c8b..c8f94f2 100644 --- a/FMark/src/Common/TOCite/TOCite.fs +++ b/FMark/src/Common/TOCite/TOCite.fs @@ -53,17 +53,12 @@ let rec tocParse tocLst depth index : THeader list * Token list = |> fun (x,y) -> x, a::y | [] -> [], [] -let tocGen' tokenLst maxDepth = - match maxDepth with - | 0 -> tocParse tokenLst 0 0 - | d when d > 0 -> - tocParse tokenLst 0 0 - |> fun (x,y) -> List.filter (fun x -> x.Level <= d) x, y - | _ -> failwithf "Invalid maxDepth" // will railway this. not necessary yet +let tocGen' tokenLst = + tocParse tokenLst 0 0 // call this when ParsedObj wanted -let tocGen tLst maxD = - {HeaderLst = tocGen' tLst maxD |> fun (x,_)->x} +let tocGen tLst = + {HeaderLst = tocGen' tLst |> fun (x,_)->x} // -------------------------------------------------------------------------------- // /parse footnotes with parseInLineElements @@ -138,5 +133,5 @@ let citeGen' tLst = let preParser tLst = citeGen' tLst - |> fun (x,y) -> x, tocGen' y 0 + |> fun (x,y) -> x, tocGen' y |> fun (x,(y,z)) -> y, x, z \ No newline at end of file diff --git a/FMark/src/Common/TOCite/TOCiteTest.fs b/FMark/src/Common/TOCite/TOCiteTest.fs index cf0a6c3..22ea704 100644 --- a/FMark/src/Common/TOCite/TOCiteTest.fs +++ b/FMark/src/Common/TOCite/TOCiteTest.fs @@ -96,7 +96,7 @@ let testDataHd = [ ] let makeHdTest (name,inn,out) = - testCase name <| fun () -> Expect.equal (tocGen' inn 0) out "Unit test" + testCase name <| fun () -> Expect.equal (tocGen' inn) out "Unit test" [] let hdTests = -- cgit