fix: sort expression printing

main
Henrik 2023-09-10 14:44:14 +02:00
parent f0967b7072
commit f7307953d8
1 changed files with 5 additions and 4 deletions

View File

@ -254,11 +254,12 @@ partial def infoFormatToHtml (i : CodeWithInfos) : HtmlM (Array Html) := do
| .sort _ => | .sort _ =>
match t with match t with
| .text t => | .text t =>
let mut sortPrefix :: rest := t.splitOn " " | unreachable! let sortPrefix :: rest := t.splitOn " " | unreachable!
let sortLink := <a href={s!"{← getRoot}foundational_types.html"}>{sortPrefix}</a> let sortLink := <a href={s!"{← getRoot}foundational_types.html"}>{sortPrefix}</a>
if rest != [] then let mut restStr := String.intercalate " " rest
rest := " " :: rest if restStr.length != 0 then
return #[sortLink, Html.text <| String.join rest] restStr := " " ++ restStr
return #[sortLink, Html.text restStr]
| _ => | _ =>
return #[<a href={s!"{← getRoot}foundational_types.html"}>[← infoFormatToHtml t]</a>] return #[<a href={s!"{← getRoot}foundational_types.html"}>[← infoFormatToHtml t]</a>]
| _ => | _ =>