doc: Output.Structure
parent
3fd17bd261
commit
8e4b7bdb50
|
@ -7,6 +7,9 @@ namespace Output
|
|||
open scoped DocGen4.Jsx
|
||||
open Lean
|
||||
|
||||
/--
|
||||
Render a single field consisting of its documentation, its name and its type as HTML.
|
||||
-/
|
||||
def fieldToHtml (f : NameInfo) : HtmlM Html := do
|
||||
let shortName := f.name.components'.head!.toString
|
||||
let name := f.name.toString
|
||||
|
@ -23,6 +26,9 @@ def fieldToHtml (f : NameInfo) : HtmlM Html := do
|
|||
<div class="structure_field_info">{s!"{shortName} "} : [←infoFormatToHtml f.type]</div>
|
||||
</li>
|
||||
|
||||
/--
|
||||
Render all information about a structure as HTML.
|
||||
-/
|
||||
def structureToHtml (i : StructureInfo) : HtmlM (Array Html) := do
|
||||
let structureHtml :=
|
||||
if Name.isSuffixOf `mk i.ctor.name then
|
||||
|
|
Loading…
Reference in New Issue