Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlomeli committed Aug 14, 2022
1 parent 7c7f93e commit 930006f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/fsdocs-tool/BuildCommand.fs
Original file line number Diff line number Diff line change
Expand Up @@ -555,16 +555,18 @@ type internal DocContent
with _ ->
Int32.MaxValue)
| None -> Int32.MaxValue)

let orderList list =
list
|> List.sortBy (fun model ->
match model.Index with
| Some s ->
(try
int32 s
with _ ->
Int32.MaxValue)
| None -> Int32.MaxValue)
match model.Index with
| Some s ->
(try
int32 s
with _ ->
Int32.MaxValue)
| None -> Int32.MaxValue)

if Menu.isTemplatingAvailable input then
let createGroup (header: string) (items: LiterateDocModel list) : string =
//convert items into menuitem list
Expand Down Expand Up @@ -602,8 +604,8 @@ type internal DocContent
// At least one category has been specified. Sort each category by index and emit
// Use 'Other' as a header for uncategorised things
for (cat, modelsInCategory) in modelsByCategory do
let modelsInCategory =
orderList modelsInCategory
let modelsInCategory = orderList modelsInCategory

match cat with
| Some c -> li [ Class "nav-header" ] [ !!c ]
| None -> li [ Class "nav-header" ] [ !! "Other" ]
Expand Down

0 comments on commit 930006f

Please sign in to comment.