/- Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license. Authors: Joseph Tooby-Smith -/ -- import DocGen4.Output.DocString import HepLean.Meta.Informal.Post import HepLean.Meta.Notes.NoteFile /-! ## Turns a delaration into a html note structure. -/ namespace HepLean open Lean /-- A `HTMLNote` is a structure containing the html information from individual contributions (commands, informal commands, note ..) etc. to a note file. -/ structure HTMLNote where /-- The name of the file the contribution came from. -/ fileName : Name /-- The html contribution of the content. -/ content : String /-- The line in the file where the contribution came from. -/ line : Nat /-- Converts a note info into a HTMLNote. -/ def HTMLNote.ofNodeInfo (ni : NoteInfo) : HTMLNote := { ni with } /-- An formal definition or lemma to html for a note. -/ def HTMLNote.ofFormal (name : Name) : CoreM HTMLNote := do let line ← name.lineNumber let fileName ← name.fileName return { fileName, line, content := s!"
{← name.getDeclString}