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

View file

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