import DocGen4.Output.Template import DocGen4.Output.DocString namespace DocGen4 namespace Output open scoped DocGen4.Jsx open Lean def fieldToHtml (f : NameInfo) : HtmlM Html := do let shortName := f.name.components'.head!.toString let name := f.name.toString pure
  • {s!"{shortName} "} : [←infoFormatToHtml f.type]
  • def structureToHtml (i : StructureInfo) : HtmlM (Array Html) := do let structureHtml := if Name.isSuffixOf `mk i.ctor.name then () else let ctorShortName := i.ctor.name.components'.head!.toString () let docstringHtml? := i.doc.map docStringToHtml match docstringHtml? with | some d => pure #[structureHtml, d] | none => pure #[structureHtml] end Output end DocGen4