[ docs ] Fix HTML formatting for record projections

The `Decl` annotation should go directly on the name-type part. This
automatically fixes the `Decl` annotation being skipped, when no
docstring is found.
This commit is contained in:
Johann Rudloff 2021-06-30 18:56:51 +02:00 committed by G. Allais
parent 6fbba94c21
commit f2f83bd531

View File

@ -244,11 +244,10 @@ getDocsForName fc n
| Nothing => pure Empty
ty <- resugar [] =<< normaliseHoles defs [] (type def)
let prettyName = pretty (nameRoot nm)
let projDecl = hsep [ fun nm prettyName, colon, prettyTerm ty ]
let projDecl = annotate (Decl nm) $ hsep [ fun nm prettyName, colon, prettyTerm ty ]
let [(_, str)] = lookupName nm (docstrings syn)
| _ => pure projDecl
pure $ annotate (Decl nm)
$ vcat [ projDecl
pure $ vcat [ projDecl
, annotate DocStringBody $ vcat (reflowDoc str)
]