feat(11.1-02): check module identifiers in docs and READMEs
- go/parser index of every modules/ package and sub-package, with methods, fields, interface methods and promoted members - code spans in docs pages, module READMEs and the root README fail Check and docs:build when the named identifier does not exist - scripts/check-phase11.1.sh with preconditions, deps, docs, forbidden, go and a self-test that plants one violation per rule
This commit is contained in:
@@ -253,6 +253,13 @@ func (s *site) parsePage(md goldmark.Markdown, p *Page) (ast.Node, *pageContext)
|
||||
return doc, pctx
|
||||
}
|
||||
|
||||
// parseRaw parses a Markdown body with the renderer's parser and slug IDs
|
||||
// but no page context, so link destinations stay as written.
|
||||
func (s *site) parseRaw(md goldmark.Markdown, body []byte) ast.Node {
|
||||
ctx := parser.NewContext(parser.WithIDs(newSlugIDs()))
|
||||
return md.Parser().Parse(text.NewReader(body), parser.WithContext(ctx))
|
||||
}
|
||||
|
||||
// renderPage parses and renders a page body to HTML.
|
||||
func (s *site) renderPage(md goldmark.Markdown, p *Page) (renderedPage, error) {
|
||||
doc, pctx := s.parsePage(md, p)
|
||||
|
||||
Reference in New Issue
Block a user