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
Showing only changes of commit c80d5016f6 - Show all commits
+5 -5
View File
@@ -6,22 +6,22 @@ import (
"strings" "strings"
) )
// heldCheck rejects every route to a held sibling name except the ones that read its // heldCheck rejects a format reading one held draw two ways, and every route to a held
// draw. An expansion holds one draw of that name; anything else that renders it draws // name except the readers of its draw. An expansion holds one draw of that name;
// again, and the two disagree. // anything else that renders it draws again, and the two disagree.
// docs/decisions.md#the-expansion-hold-and-the-renders-draws-are-two-fences // docs/decisions.md#the-expansion-hold-and-the-renders-draws-are-two-fences
func heldCheck(path string, n node) error { func heldCheck(path string, n node) error {
t, ok := n.(*template) t, ok := n.(*template)
if !ok || len(t.compiled.held) == 0 { if !ok || len(t.compiled.held) == 0 {
return nil return nil
} }
if err := checkHeld(t); err != nil { if err := checkTemplateHold(t); err != nil {
return fmt.Errorf("%s: %w", t.site.label(path), err) return fmt.Errorf("%s: %w", t.site.label(path), err)
} }
return nil return nil
} }
func checkHeld(t *template) error { func checkTemplateHold(t *template) error {
if err := checkNoOverlap(t.compiled); err != nil { if err := checkNoOverlap(t.compiled); err != nil {
return err return err
} }