package rendering import ( "bytes" "encoding/hex" "hash" "html" "html/template" "io" "path" "github.com/gomarkdown/markdown/ast" ) const ( mermaidCodeBlock = "mermaid" ) type RevealRenderer struct { Hash hash.Hash } func (r *RevealRenderer) RenderHook(w io.Writer, node ast.Node, entering bool) (ast.WalkStatus, bool) { switch b := node.(type) { case *ast.ListItem: if entering { return r.handleListItem(w, b) } return ast.GoToNext, false case *ast.Text: if !entering { return ast.GoToNext, false } if notesRegexp.Match(b.Literal) { _, err := w.Write([]byte(`