diff options
author | Qieerb <qieerbushe7@gmail.com> | 2018-03-23 09:57:05 +0000 |
---|---|---|
committer | ps-george <george.punter15@imperial.ac.uk> | 2018-03-23 09:57:05 +0000 |
commit | 28567ef3834c8675196c27d4a5b57065bceb5f7f (patch) | |
tree | 4408282218cbe626428f0df8ac4fee731ad43776 | |
parent | 93f25bc4bf55415e7f1474ff394e097843f58e65 (diff) | |
download | FMark-28567ef3834c8675196c27d4a5b57065bceb5f7f.tar.gz FMark-28567ef3834c8675196c27d4a5b57065bceb5f7f.zip |
Remove function no longer used (#168)
-rw-r--r-- | FMark/src/Common/TOCite/TOCite.fs | 15 | ||||
-rw-r--r-- | FMark/src/Common/TOCite/TOCiteTest.fs | 2 |
2 files changed, 6 insertions, 11 deletions
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" [<Tests>] let hdTests = |