diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 476b308..8f961d9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,14 +25,6 @@ jobs:
run: |
lake build
- - name: Checkout and compile LeanInk
- run: |
- cd ../
- git clone https://github.com/hargonix/LeanInk
- cd LeanInk
- git checkout doc-gen-json
- lake build
-
- name: Checkout and compile mathlib4
run: |
cd ../
diff --git a/DocGen4/LeanInk/Output.lean b/DocGen4/LeanInk/Output.lean
index 60d1d31..60f7a86 100644
--- a/DocGen4/LeanInk/Output.lean
+++ b/DocGen4/LeanInk/Output.lean
@@ -5,7 +5,6 @@ Authors: Henrik Böving, Xubai Wang
-/
import DocGen4.Output.Base
import DocGen4.Output.ToHtmlFormat
-import DocGen4.LeanInk.Process
import Lean.Data.Json
import LeanInk.Annotation.Alectryon
@@ -17,7 +16,8 @@ open scoped DocGen4.Jsx
structure AlectryonContext where
counter : Nat
-abbrev AlectryonM := StateT AlectryonContext HtmlM
+abbrev AlectryonT := StateT AlectryonContext
+abbrev AlectryonM := AlectryonT HtmlM
def getNextButtonLabel : AlectryonM String := do
let val ← get
@@ -35,7 +35,7 @@ def TypeInfo.toHtml (tyi : TypeInfo) : AlectryonM Html := do
{tyi.name}
:
- {tyi.type}
+ [←DocGen4.Output.infoFormatToHtml tyi.type.fst]
@@ -80,16 +80,16 @@ def Contents.toHtml : Contents → AlectryonM Html
def Hypothesis.toHtml (h : Hypothesis) : AlectryonM Html := do
let mut hypParts := #[[h.names.intersperse ", " |>.map Html.text |>.toArray]]
- if h.body != "" then
+ if h.body.snd != "" then
hypParts := hypParts.push
:=
- {h.body}
+ [←infoFormatToHtml h.body.fst]
hypParts := hypParts.push
:
- {h.type}
+ [←infoFormatToHtml h.type.fst]
pure
@@ -103,6 +103,11 @@ def Goal.toHtml (g : Goal) : AlectryonM Html := do
let rendered ← hyp.toHtml
hypotheses := hypotheses.push rendered
hypotheses := hypotheses.push
+ let conclusionHtml ←
+ match g.conclusion with
+ | .typed info _ => infoFormatToHtml info
+ | .untyped str => pure <| #[Html.text str]
+
pure
@@ -112,7 +117,7 @@ def Goal.toHtml (g : Goal) : AlectryonM Html := do
{g.name}- {g.conclusion} + [conclusionHtml]@@ -197,27 +202,14 @@ def baseHtml (content : Array Html) : AlectryonM Html := do