package doc import ( "strings" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/renderer" "github.com/yuin/goldmark/renderer/html" "github.com/yuin/goldmark/util" ) // This file is the REVIEW plane's markdown renderer: the one that renders a // document nobody has approved yet. // // SECURITY, AND WHY IT DIFFERS FROM NewRenderer. The read plane turns goldmark's // unsafe mode on, and the reason it states — "documents here are first-party and // reviewed" — is exactly inverted on the review page: the source is // agent-authored and approving it is what the page is for. So this renderer // leaves unsafe OFF. Do not "align it with the read renderer": a