From d884cbc3ca91b831a0feb0fa41e1dd743c5a4177 Mon Sep 17 00:00:00 2001 From: Theodor Fiedler Date: Mon, 6 May 2024 11:55:48 +0200 Subject: [PATCH] Fix random typos (#13540) --- CHANGELOG.md | 2 +- lib/elixir/pages/anti-patterns/code-anti-patterns.md | 2 +- lib/elixir/pages/getting-started/comprehensions.md | 2 +- lib/elixir/pages/references/patterns-and-guards.md | 2 +- lib/elixir/pages/references/unicode-syntax.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9509af04a..9fbf6a8772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,7 @@ TODO. * [Duration] Add a new `Duration` data type * [Kernel] Add `Kernel.get_in/1` with safe nil-handling for access and structs * [Kernel] Emit warnings for undefined functions from modules defined within the same context as the caller code - * [Macro] Add `Macro.Env.define_alias/4`, `Macro.Env.define_import/4`, `Macro.Env.define_require/4`, `Macro.Env.expand_alias/4`, `Macro.Env.expand_import/5`, and `Macro.Env.expand_require/6` to aid the implementation of language servers and embeddeed languages + * [Macro] Add `Macro.Env.define_alias/4`, `Macro.Env.define_import/4`, `Macro.Env.define_require/4`, `Macro.Env.expand_alias/4`, `Macro.Env.expand_import/5`, and `Macro.Env.expand_require/6` to aid the implementation of language servers and embedded languages * [NaiveDateTime] Add `NaiveDateTime.shift/2` to shift naive datetimes with duration and calendar-specific semantics * [Process] Add `Process.set_label/1` * [String] Add `String.byte_slice/3` to slice a string to a maximum number of bytes while keeping it UTF-8 encoded diff --git a/lib/elixir/pages/anti-patterns/code-anti-patterns.md b/lib/elixir/pages/anti-patterns/code-anti-patterns.md index 032df277cd..aadd7a69e4 100644 --- a/lib/elixir/pages/anti-patterns/code-anti-patterns.md +++ b/lib/elixir/pages/anti-patterns/code-anti-patterns.md @@ -321,7 +321,7 @@ When you use `map[:key]` to access a key that always exists in the map, you are #### Example -The function `plot/1` tries to draw a graphic to represent the position of a point in a cartesian plane. This function receives a parameter of `Map` type with the point attributes, which can be a point of a 2D or 3D cartesian coordinate system. This function uses dynamic access to retrieve values for the map keys: +The function `plot/1` tries to draw a graphic to represent the position of a point in a Cartesian plane. This function receives a parameter of `Map` type with the point attributes, which can be a point of a 2D or 3D Cartesian coordinate system. This function uses dynamic access to retrieve values for the map keys: ```elixir defmodule Graphics do diff --git a/lib/elixir/pages/getting-started/comprehensions.md b/lib/elixir/pages/getting-started/comprehensions.md index 6be06373e8..e39d1c7bf9 100644 --- a/lib/elixir/pages/getting-started/comprehensions.md +++ b/lib/elixir/pages/getting-started/comprehensions.md @@ -50,7 +50,7 @@ for dir <- dirs, end ``` -Multiple generators can also be used to calculate the cartesian product of two lists: +Multiple generators can also be used to calculate the Cartesian product of two lists: ```elixir iex> for i <- [:a, :b, :c], j <- [1, 2], do: {i, j} diff --git a/lib/elixir/pages/references/patterns-and-guards.md b/lib/elixir/pages/references/patterns-and-guards.md index 909d291544..e1e3a437dc 100644 --- a/lib/elixir/pages/references/patterns-and-guards.md +++ b/lib/elixir/pages/references/patterns-and-guards.md @@ -283,7 +283,7 @@ You can find the built-in list of guards [in the `Kernel` module](`Kernel#guards * arithmetic binary operators ([`+`](`+/2`), [`-`](`-/2`), [`*`](`*/2`), [`/`](`//2`)) * [`in`](`in/2`) and [`not in`](`in/2`) operators (as long as the right-hand side is a list or a range) * "type-check" functions (`is_list/1`, `is_number/1`, and the like) - * functions that work on built-in datatypes (`abs/1`, `hd/1`, `map_size/1`, and others) + * functions that work on built-in data types (`abs/1`, `hd/1`, `map_size/1`, and others) * the `map.field` syntax The module `Bitwise` also includes a handful of [Erlang bitwise operations as guards](Bitwise.html#guards). diff --git a/lib/elixir/pages/references/unicode-syntax.md b/lib/elixir/pages/references/unicode-syntax.md index 8a29f80f01..d9554775b0 100644 --- a/lib/elixir/pages/references/unicode-syntax.md +++ b/lib/elixir/pages/references/unicode-syntax.md @@ -136,9 +136,9 @@ Elixir will not warn on confusability for identifiers made up exclusively of cha ### C3. Mixed Script Detection -Elixir will not allow tokenization of mixed-script identifiers unless the mixings is one of the exceptions defined in UTS 39 5.2, 'Highly Restrictive'. We use the means described in Section 5.1, Mixed-Script Detection, to determine if script mixing is occurring, with the modification documented in the section 'Additional Normalizations', below. +Elixir will not allow tokenization of mixed-script identifiers unless the mixing is one of the exceptions defined in UTS 39 5.2, 'Highly Restrictive'. We use the means described in Section 5.1, Mixed-Script Detection, to determine if script mixing is occurring, with the modification documented in the section 'Additional Normalizations', below. -Examples: Elixir allows an identifiers like `幻ㄒㄧㄤ`, even though it includes characters from multiple 'scripts', because those scripts all 'resolve' to Japanese when applying the resolution rules from UTS 39 5.1. It also allows an atom like `:Tシャツ`, the Japanese word for 't-shirt', which incorporates a Latin capital T, because {Latn, Jpan} is one of the allowed script mixings in the definition of 'Highly Restrictive' in UTS 39 5.2, and it 'covers' the string. +Examples: Elixir allows an identifiers like `幻ㄒㄧㄤ`, even though it includes characters from multiple 'scripts', because those scripts all 'resolve' to Japanese when applying the resolution rules from UTS 39 5.1. It also allows an atom like `:Tシャツ`, the Japanese word for 't-shirt', which incorporates a Latin capital T, because {Latn, Jpan} is one of the allowed script mixing in the definition of 'Highly Restrictive' in UTS 39 5.2, and it 'covers' the string. However, Elixir would prevent tokenization in code like `if аdmin, do: :ok, else: :err`, where the scriptset for the 'a' character is {Cyrillic} but all other characters have scriptsets of {Latin}. The scriptsets fail to resolve, and the scriptsets from the definition of 'Highly Restrictive' in UTS 39 5.2 do not cover the string either, so a descriptive error is shown.