mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 04:09:10 +03:00
[ docs ] Ignore empty record field docstrings
This commit is contained in:
parent
7c1ab56ca0
commit
5e70a77310
@ -245,11 +245,13 @@ getDocsForName fc n
|
||||
ty <- resugar [] =<< normaliseHoles defs [] (type def)
|
||||
let prettyName = pretty (nameRoot nm)
|
||||
let projDecl = annotate (Decl nm) $ hsep [ fun nm prettyName, colon, prettyTerm ty ]
|
||||
let [(_, str)] = lookupName nm (docstrings syn)
|
||||
| _ => pure projDecl
|
||||
pure $ vcat [ projDecl
|
||||
, annotate DocStringBody $ vcat (reflowDoc str)
|
||||
]
|
||||
case lookupName nm (docstrings syn) of
|
||||
[(_, "")] => pure projDecl
|
||||
[(_, str)] =>
|
||||
pure $ vcat [ projDecl
|
||||
, annotate DocStringBody $ vcat (reflowDoc str)
|
||||
]
|
||||
_ => pure projDecl
|
||||
|
||||
getFieldsDoc : Name -> Core (List (Doc IdrisDocAnn))
|
||||
getFieldsDoc recName
|
||||
|
Loading…
Reference in New Issue
Block a user