Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style(comments): drop "may" from the comment wording
Elian Doran2380867e290b
diff --git a/apps/client/src/widgets/ribbon/search_completions.spec.ts b/apps/client/src/widgets/ribbon/search_completions.spec.tsindex d39d330a9f..05d99d9537 100644--- a/apps/client/src/widgets/ribbon/search_completions.spec.ts+++ b/apps/client/src/widgets/ribbon/search_completions.spec.ts@@ -262,7 +262,7 @@ describe("searchCompletionSource", () => {expect(labelsOf(await complete("note.isProtected = t"))).toEqual([ "true", "false" ]);// A space settles the operator, so the values come without typing one; directly after it- // the operator may still be growing into `!=` or `=*`.+ // the operator can still be growing into `!=` or `=*`.expect(labelsOf(await complete("note.isProtected = "))).toEqual([ "true", "false" ]);expect(labelsOf(await complete("note.isProtected ="))).toContain("=*");expect(labelsOf(await complete("note.isArchived = t"))).toEqual([ "true", "false" ]);diff --git a/apps/client/src/widgets/ribbon/search_completions.ts b/apps/client/src/widgets/ribbon/search_completions.tsindex 0412927c20..109f06a03e 100644--- a/apps/client/src/widgets/ribbon/search_completions.ts+++ b/apps/client/src/widgets/ribbon/search_completions.ts@@ -503,7 +503,7 @@ function orderingPosition(context: CompletionContext): OrderingPosition {// Each key is ordered on its own, so only what follows the last comma counts.const key = ordering.text.slice(ordering.text.lastIndexOf(",") + 1).replace(/^\s*orderby/i, "");- // What is being typed is not a key yet, and says nothing about what may follow one.+ // What is being typed is not a key yet, and says nothing about what can follow one.const written = key.replace(new RegExp(`${WORD_PREFIX.source}$`), "").trim();if (/(^|\s)limit(\s|$)/i.test(written)) {diff --git a/apps/client/src/widgets/type_widgets/helpers/SvgSplitEditor.spec.tsx b/apps/client/src/widgets/type_widgets/helpers/SvgSplitEditor.spec.tsxindex 8ac50bae77..0c0fd6109d 100644--- a/apps/client/src/widgets/type_widgets/helpers/SvgSplitEditor.spec.tsx+++ b/apps/client/src/widgets/type_widgets/helpers/SvgSplitEditor.spec.tsx@@ -78,8 +78,9 @@ describe("SvgSplitEditor", () => {const svgEl = container.querySelector(".svg-preview-viewport .render-container svg");expect(svgEl).not.toBeNull();- // The fit comes from the viewBox rather than from a measured scale, so nothing may strip it- // — svg-pan-zoom used to, which shrank gantt charts to invisibility on a re-fit (#9749).+ // The fit comes from the viewBox rather than from a measured scale, so it must not be+ // stripped — svg-pan-zoom used to, which shrank gantt charts to invisibility on a re-fit+ // (#9749).expect(svgEl?.getAttribute("viewBox")).toBe(ORIGINAL_VIEW_BOX);expect(transformWrapperSpy).toHaveBeenCalledWith(diff --git a/packages/codemirror/src/field_editor.spec.ts b/packages/codemirror/src/field_editor.spec.tsindex cd99b440e9..f1605402d1 100644--- a/packages/codemirror/src/field_editor.spec.ts+++ b/packages/codemirror/src/field_editor.spec.ts@@ -88,7 +88,7 @@ describe("createFieldEditor", () => {editor = view;view.dispatch({ selection: EditorSelection.cursor(2) });- // The popup drops both keys for `interactionDelay` after it opens; neither may reach the+ // The popup drops both keys for `interactionDelay` after it opens; neither reaches the// field in that window, since the field's own commands move focus out of the editor.await openCompletion(view);pressKey(view, "ArrowDown");