Skip to content

Commit

Permalink
Fix random typos (#13540)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfiedlerdejanze committed May 6, 2024
1 parent 8d0ecb5 commit d884cbc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/anti-patterns/code-anti-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/getting-started/comprehensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/pages/references/patterns-and-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/pages/references/unicode-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit d884cbc

Please sign in to comment.