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 aee932dc93 - Show all commits
+6 -6
View File
@@ -69,12 +69,12 @@ func refSegments(name string, folder []string) ([]string, error) {
// linkRefs resolves every reference in the assembled tree and compiles every format. // linkRefs resolves every reference in the assembled tree and compiles every format.
// The head of the path — up to the category it names — is bound into the referring // The head of the path — up to the category it names — is bound into the referring
// template's refHeads under its root path, and the rest reads into it the way a sibling path does, so // template's refHeads under its root path, and the rest reads into it the way a
// a reference is held like a sibling and two spellings of one target are one // sibling path does, so a reference is held like a sibling and two spellings of one
// draw. It runs once, after all data is merged, so a reference sees the final // target are one draw. It runs once, after all data is merged, so a reference sees
// (override-resolved) tree. A path that is unknown, names a folder, or reads a // the final (override-resolved) tree. A path that is unknown, names a folder, or
// field not every variant carries fails here, keeping a bad reference a New-time // reads a field not every variant carries fails here, keeping a bad reference a
// error, never a random render-time one. // New-time error, never a random render-time one.
func linkRefs(root map[string]node) error { func linkRefs(root map[string]node) error {
return eachTemplate(root, func(folder []string, path string, t *template) error { return eachTemplate(root, func(folder []string, path string, t *template) error {
category := strings.Join(strings.Split(path, ".")[:len(folder)+1], ".") category := strings.Join(strings.Split(path, ".")[:len(folder)+1], ".")