Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33

Open
lilleman wants to merge 966 commits from worktree-todo-relative-dates-exact-counts into main
2 changed files with 3 additions and 3 deletions
Showing only changes of commit b41ce7679f - Show all commits
+2 -1
View File
@@ -11,7 +11,8 @@ import (
// node is a compiled element of the namespace tree: a folder, choice, null, // node is a compiled element of the namespace tree: a folder, choice, null,
// template, table, column or row. Compiling JSON into these once (see compile) // template, table, column or row. Compiling JSON into these once (see compile)
// means rendering never re-inspects the raw JSON or re-sums weights. // means rendering never re-inspects the raw JSON or re-sums weights. A new kind goes in
// every switch that panics through internalError on a kind it does not list.
type node interface{ isNode() } type node interface{ isNode() }
// folder is a namespace of named children, built from a directory of JSON files // folder is a namespace of named children, built from a directory of JSON files
+1 -2
View File
@@ -49,8 +49,7 @@ func descend(s *session, root node, segments []string, sc renderScope) (node, er
// render evaluates a compiled node to a string. compile validates every node up // render evaluates a compiled node to a string. compile validates every node up
// front, so rendering a compiled tree cannot fail. sc holds the reference draws the // front, so rendering a compiled tree cannot fail. sc holds the reference draws the
// render shares; each repeat iteration renders over a hold set of its own. // render shares; each repeat iteration renders over a hold set of its own.
// renderEdges mirrors this switch for the fences. A new node kind goes in every switch // renderEdges mirrors this switch for the fences.
// that panics through internalError on a kind it does not list.
func render(s *session, n node, sc renderScope) string { func render(s *session, n node, sc renderScope) string {
switch n := n.(type) { switch n := n.(type) {
case *choice: case *choice: