The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
var (
ErrNoValue = errors.New("give one of title, old or section")
ErrNoMatch = errors.New("text not found in the note")
ErrMany = errors.New("text found more than once in the note")
)
Process changes a part of a note through patchnote, the path of a full edit: a locked note refuses, the text
replaced goes to the history as an edit's would, the #tags and the title follow the new text, the links the new title.
Retitle gives content with title in its first heading, else a heading added on top, as the app renames a note.
TODO: the marks and #tags of that heading are replaced too, like the app's rename; keep them if renamed headings lose tags.
type Input struct {
ID string `json:"-"`
Title string `json:"title,omitempty" binding:"optional"` // the new title: the first heading takes it, or one is added on top Old string `json:"old,omitempty" binding:"optional"` // an exact text, with its case, to find once (or every time with all) New string `json:"new,omitempty" binding:"optional"` // what replaces old or the body of section, empty to delete it All bool `json:"all,omitempty" binding:"optional"` // replace every occurrence of old instead of refusing more than one// Section is the words of a heading: what follows it, down to the next heading of its level or higher, becomes New. Section string `json:"section,omitempty" binding:"optional"`
}
Input is one change of a note's text: Title renames it, Old is replaced by New, or Section has its body replaced by New.