refactor: Fix notes

This commit is contained in:
jstoobysmith 2025-02-03 12:04:24 +00:00
parent 87f0dabbb5
commit 8abed940c2
2 changed files with 3 additions and 3 deletions

View file

@ -6,6 +6,7 @@ Authors: Joseph Tooby-Smith
import HepLean.Meta.Basic
import HepLean.Meta.Remark.Properties
import HepLean.Meta.Notes.ToHTML
import Mathlib.Lean.CoreM
/-!
# Extracting notes from Lean files
@ -42,7 +43,7 @@ def DeclInfo.ofName (n : Name) : MetaM DeclInfo := do
def DeclInfo.toYML (d : DeclInfo) : MetaM String := do
let declStringIndent := d.declString.replace "\n" "\n "
let docStringIndent := d.docString.replace "\n" "\n "
let link Name.toGitHubLink d.fileName d.line
let link := Name.toGitHubLink d.fileName d.line
return s!"
- type: name
name: {d.name}
@ -82,7 +83,7 @@ def NotePart.toYMLM : ((List String) × Nat × Nat) → NotePart → MetaM ((Li
let newString := s!"
- type: remark
name: \"{shortName}\"
link: \"{Name.toGitHubLink remarkInfo.fileName remarkInfo.line}\"
link: \"{Name.toGitHubLink remarkInfo.fileName remarkInfo.line}\"
content: |
{contentIndent}"
return ⟨x.1 ++ [newString], x.2⟩

View file

@ -13,7 +13,6 @@ This file concerns with statistics of HepLean.
-/
open Lean System Meta HepLean
def getStats : MetaM String := do