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
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 0b5124d4d5 - Show all commits
+1 -1
View File
@@ -262,7 +262,7 @@ func checkArm(name string, fields map[string]node, wholeToken bool) error {
}
return fmt.Errorf("no field %q", a.head)
}
if err := checkResolves(field, a.tail, a.head); err != nil {
if err := checkPathResolves(field, a.tail, a.head); err != nil {
return fmt.Errorf("field %q: %w", a.head, err)
}
return nil
+2 -2
View File
@@ -472,12 +472,12 @@ func unreachableInChoice(c *choice, want string) error {
return fmt.Errorf("not every variant of this %d-way choice carries %q; all carry %v", len(c.items), want, offered)
}
func checkResolves(n node, tail []string, level string) error {
func checkPathResolves(n node, tail []string, level string) error {
_, err := (&pathCheck{level: level, tail: tail}).run(n)
return err
}
// compilePath compiles a path checkResolves proved.
// compilePath compiles a path checkPathResolves proved.
func compilePath(n node, tail []string) pathCheck {
w := pathCheck{tail: tail}
if _, err := w.run(n); err != nil {
+1 -1
View File
@@ -147,7 +147,7 @@ func (t *template) resolveLink(folder []string, path, category string, root map[
if category != "" && head == "/"+category {
return link, fmt.Errorf("%s: reference {%s}: names the category it sits in; read a sibling field as a path, or move the shared value into its own category and reference that", path, name)
}
if err := checkResolves(target, tail, head); err != nil {
if err := checkPathResolves(target, tail, head); err != nil {
return link, fmt.Errorf("%s: reference {%s}: %w", path, name, err)
}
link.refHeads[head] = target