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 4 additions and 11 deletions
Showing only changes of commit 42c443bd5a - Show all commits
+1 -1
View File
@@ -239,7 +239,7 @@ func checkNodeFences(s nodeScope) error {
if err := s(heldCheck); err != nil {
return err
}
fence := &drawFence{}
fence := &drawFence{fold: newReadFold()}
refs := false
if err := s(func(path string, n node) error {
if t, ok := n.(*template); ok && len(t.link.refs) > 0 {
+3 -10
View File
@@ -14,13 +14,6 @@ type drawFence struct {
fold *readFold
}
func (f *drawFence) reads() *readFold {
if f.fold == nil {
f.fold = newReadFold()
}
return f.fold
}
// checkDrawGroup refuses a draw group that splits nothing: one whose render reads every reference
// path inside a repeat or a nested draw group, which draw apart from it whatever it names.
func (f *drawFence) checkDrawGroup(path string, n node) error {
@@ -28,7 +21,7 @@ func (f *drawFence) checkDrawGroup(path string, n node) error {
if !ok || t.drawGroup == "" {
return nil
}
for _, r := range f.reads().rootReads(t) {
for _, r := range f.fold.rootReads(t) {
if r.at.group == "" && r.draws() {
return nil
}
@@ -41,7 +34,7 @@ func (f *drawFence) checkDraws(path string, n node) error {
if !ok {
return nil
}
reads := f.reads().rootReads(t)
reads := f.fold.rootReads(t)
if !anyDraws(reads) {
return nil
}
@@ -59,7 +52,7 @@ func (f *drawFence) checkRecordDraws(path string, n node) error {
if !ok || !t.isRecord {
return nil
}
reads := f.reads().columnReads(t, sortedNames(t.fields))
reads := f.fold.columnReads(t, sortedNames(t.fields))
if !anyDraws(reads) {
return nil
}