mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-21 02:07:25 +03:00
[ 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:
parent
6fbba94c21
commit
f2f83bd531
@ -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)
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user