diff --git a/adapter/sqlite/note_dao.go b/adapter/sqlite/note_dao.go index b3568db..5018fa6 100644 --- a/adapter/sqlite/note_dao.go +++ b/adapter/sqlite/note_dao.go @@ -526,6 +526,9 @@ func (d *NoteDAO) findRows(opts note.FinderOpts) (*sql.Rows, error) { query += fmt.Sprintf(" AND tc.distance < %d", maxDistance) } + // Guard against infinite loops by limiting the number of recursions. + query += "\n LIMIT 100000" + query += "\n)\n" } diff --git a/docs/.zk/config.toml b/docs/.zk/config.toml index 60484a6..3bed872 100644 --- a/docs/.zk/config.toml +++ b/docs/.zk/config.toml @@ -1,4 +1,5 @@ [note] +filename = "{{slug title}}" template = "default.md" [tool] diff --git a/docs/external-processing.md b/docs/external-processing.md index 17bed28..febf1e7 100644 --- a/docs/external-processing.md +++ b/docs/external-processing.md @@ -1,7 +1,5 @@ # Send notes for processing by other programs - - A great way to expand `zk` feature set is to explore a wealth of command-line tools available. You can use `zk`'s powerful [searching and filtering](note-filtering.md) capabilities to select notes before delegating further processing to other programs. ## Process file paths diff --git a/docs/style.md b/docs/style.md index 67dc760..4e20c6d 100644 --- a/docs/style.md +++ b/docs/style.md @@ -1,7 +1,5 @@ # Styling - - `zk` supports a `{{style}}` [template helper](template.md) to format its output with colors and font decorations. Usage: `{{style "" ""}}`