From 0f88055573a0ed9871993a62bcb7c3f44d98e07f Mon Sep 17 00:00:00 2001 From: luzpaz Date: Fri, 5 Aug 2022 23:57:52 -0400 Subject: [PATCH] Fix various typos (#745) Found via `codespell -q 3 -L complies,crate,doubleclick,ist,ser,vew` --- bezier-rs/docs/interactive-docs/wasm/src/svg_drawing.rs | 2 +- bezier-rs/lib/src/lib.rs | 4 ++-- frontend/src/io-managers/input.ts | 2 +- frontend/src/utility-functions/keyboard-entry.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bezier-rs/docs/interactive-docs/wasm/src/svg_drawing.rs b/bezier-rs/docs/interactive-docs/wasm/src/svg_drawing.rs index 479146c1..5b78bd76 100644 --- a/bezier-rs/docs/interactive-docs/wasm/src/svg_drawing.rs +++ b/bezier-rs/docs/interactive-docs/wasm/src/svg_drawing.rs @@ -2,7 +2,7 @@ pub const SVG_OPEN_TAG: &str = r#""#; pub const SVG_CLOSE_TAG: &str = ""; -// Sylistic constants +// Stylistic constants pub const BLACK: &str = "black"; /// Helper function to create an SVG text entitty. diff --git a/bezier-rs/lib/src/lib.rs b/bezier-rs/lib/src/lib.rs index 899392ce..a5aa7efb 100644 --- a/bezier-rs/lib/src/lib.rs +++ b/bezier-rs/lib/src/lib.rs @@ -610,7 +610,7 @@ impl Bezier { .unwrap() } - /// Returns a Bezier curve that results from applying the tranformation function to each point in the Bezier. + /// Returns a Bezier curve that results from applying the transformation function to each point in the Bezier. pub fn apply_transformation(&self, transformation_function: &dyn Fn(DVec2) -> DVec2) -> Bezier { let transformed_start = transformation_function(self.start); let transformed_end = transformation_function(self.end); @@ -735,7 +735,7 @@ impl Bezier { return list_intersection_t .into_iter() - // Accept the t value if it is approximately in [0, 1] and if the coresponding coordinates are within the range of the linear line + // Accept the t value if it is approximately in [0, 1] and if the corresponding coordinates are within the range of the linear line .filter(|&t| { utils::f64_approximately_in_range(t, 0., 1., MAX_ABSOLUTE_DIFFERENCE) && utils::dvec2_approximately_in_range(self.unrestricted_evaluate(t), min, max, MAX_ABSOLUTE_DIFFERENCE).all() diff --git a/frontend/src/io-managers/input.ts b/frontend/src/io-managers/input.ts index c6f1f7ea..c546f945 100644 --- a/frontend/src/io-managers/input.ts +++ b/frontend/src/io-managers/input.ts @@ -289,7 +289,7 @@ export function createInputManager(editor: Editor, container: HTMLElement, dialo // In the catch block, explain to the user why the paste failed and how to fix or work around the problem try { // Attempt to check if the clipboard permission is denied, and throw an error if that is the case - // In Firefox, the `clipboard-read` permission isn't supported, so attemping to query it throws an error + // In Firefox, the `clipboard-read` permission isn't supported, so attempting to query it throws an error // In Safari, the entire Permissions API isn't supported, so the query never occurs and this block is skipped without an error and we assume we might have permission const clipboardRead = "clipboard-read" as PermissionName; const permission = await navigator.permissions?.query({ name: clipboardRead }); diff --git a/frontend/src/utility-functions/keyboard-entry.ts b/frontend/src/utility-functions/keyboard-entry.ts index ee8d4b3b..746dd6f3 100644 --- a/frontend/src/utility-functions/keyboard-entry.ts +++ b/frontend/src/utility-functions/keyboard-entry.ts @@ -29,7 +29,7 @@ export function getLatinKey(e: KeyboardEvent): string | null { const LAST_LATIN_UNICODE_CHAR = 0x024f; if (key.length > 1 || key.charCodeAt(0) > LAST_LATIN_UNICODE_CHAR) return keyCodeToKey(e.code); - // Otherwise, ths is a printable Latin character + // Otherwise, this is a printable Latin character return e.key.toLowerCase(); }