Skip to content

Commit 473a83b

Browse files
eksperimentaljosevalim
authored andcommitted
Use backtick in "returns true" and "returns false" in docs (#7865)
[ci skip]
1 parent ba6cfea commit 473a83b

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Percentage | Module
127127
* [Kernel] Warn on unsupported nested comparisons such as `x < y < z`
128128
* [Kernel] Warn if redefining documentation across clauses of the same definition
129129
* [Kernel] Warn on unnecessary quotes around atoms, keywords and calls
130-
* [Macro] Add `Macro.special_form?/2` and `Macro.operator?/2` that returns true if the given name/arity is a special form or operator respectively
130+
* [Macro] Add `Macro.special_form?/2` and `Macro.operator?/2` that returns `true` if the given name/arity is a special form or operator respectively
131131
* [Macro.Env] Add `Macro.Env.vars/1` and `Macro.Env.has_var?/2` that gives access to environment data without accessing private fields
132132
* [Regex] Include endianness in the regex version. This allows regexes to be recompiled when an archive is installed in a system with a different endianness
133133
* [Registry] Add `Registry.count/1` and `Registry.count_match/4`

lib/elixir/lib/calendar.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ defmodule Calendar do
123123
@callback months_in_year(year) :: month
124124

125125
@doc """
126-
Returns true if the given year is a leap year.
126+
Returns `true` if the given year is a leap year.
127127
128128
A leap year is a year of a longer length than normal. The exact meaning
129129
is up to the calendar. A calendar must return `false` if it does not support

lib/elixir/lib/calendar/date.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ defmodule Date do
132132
end
133133

134134
@doc """
135-
Returns true if the year in the given `date` is a leap year.
135+
Returns `true` if the year in the given `date` is a leap year.
136136
137137
## Examples
138138

lib/elixir/lib/enum.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ defmodule Enum do
273273
end
274274

275275
@doc """
276-
Returns true if the given `fun` evaluates to true on all of the items in the enumerable.
276+
Returns `true` if the given `fun` evaluates to true on all of the items in the enumerable.
277277
278278
It stops the iteration at the first invocation that returns `false` or `nil`.
279279
@@ -311,7 +311,7 @@ defmodule Enum do
311311
end
312312

313313
@doc """
314-
Returns true if the given `fun` evaluates to true on any of the items in the enumerable.
314+
Returns `true` if the given `fun` evaluates to true on any of the items in the enumerable.
315315
316316
It stops the iteration at the first invocation that returns a truthy value (neither `false` nor `nil`).
317317

lib/elixir/lib/kernel.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ defmodule Kernel do
1616
data type handling, etc
1717
* macros for control-flow and defining new functionality (modules, functions, and so on)
1818
* [guard](guards.html) checks for augmenting pattern matching
19-
19+
2020
You can use `Kernel` functions/macros without the `Kernel` prefix anywhere in
2121
Elixir code as all its functions and macros are automatically imported. For
2222
example, in IEx:
2323
2424
iex> is_number(13)
2525
true
2626
27-
If you don't want to import a function or macro from `Kernel`, use the `:except`
27+
If you don't want to import a function or macro from `Kernel`, use the `:except`
2828
option and then list the function/macro by arity:
2929
3030
import Kernel, except: [if: 2, unless: 2]
31-
31+
3232
See `Kernel.SpecialForms.import/2` for more information on importing.
3333
3434
Elixir also has special forms that are always imported and
@@ -1392,8 +1392,8 @@ defmodule Kernel do
13921392
13931393
The items are only considered to be exactly equal if they
13941394
have the same value and are of the same type. For example,
1395-
`1 == 1.0` returns true, but since they are of different
1396-
types, `1 === 1.0` returns false.
1395+
`1 == 1.0` returns `true`, but since they are of different
1396+
types, `1 === 1.0` returns `false`.
13971397
13981398
All terms in Elixir can be compared with each other.
13991399

lib/elixir/lib/macro.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ defmodule Macro do
12731273
defp do_expand_once(other, _env), do: {other, false}
12741274

12751275
@doc """
1276-
Returns true if the given name and arity is a special form.
1276+
Returns `true` if the given name and arity is a special form.
12771277
"""
12781278
@since "1.7.0"
12791279
@spec special_form?(name :: atom(), arity()) :: boolean()
@@ -1282,7 +1282,7 @@ defmodule Macro do
12821282
end
12831283

12841284
@doc """
1285-
Returns true if the given name and arity is an operator.
1285+
Returns `true` if the given name and arity is an operator.
12861286
"""
12871287
@since "1.7.0"
12881288
@spec operator?(name :: atom(), arity()) :: boolean()
@@ -1291,7 +1291,7 @@ defmodule Macro do
12911291
def operator?(name, arity) when is_atom(name) and is_integer(arity), do: false
12921292

12931293
@doc """
1294-
Returns true if the given quoted expression is an AST literal.
1294+
Returns `true` if the given quoted expression is an AST literal.
12951295
"""
12961296
@since "1.7.0"
12971297
@spec quoted_literal?(literal) :: true

lib/elixir/lib/string.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,13 @@ defmodule String do
389389
390390
Note this function can split within or across grapheme boundaries.
391391
For example, take the grapheme "é" which is made of the characters
392-
"e" and the acute accent. The following returns true:
392+
"e" and the acute accent. The following returns `true`:
393393
394394
iex> String.split(String.normalize("é", :nfd), "e")
395395
["", "́"]
396396
397397
However, if "é" is represented by the single character "e with acute"
398-
accent, then it will return false:
398+
accent, then it will return `false`:
399399
400400
iex> String.split(String.normalize("é", :nfc), "e")
401401
["é"]
@@ -2064,13 +2064,13 @@ defmodule String do
20642064
20652065
Note this function can match within or across grapheme boundaries.
20662066
For example, take the grapheme "é" which is made of the characters
2067-
"e" and the acute accent. The following returns true:
2067+
"e" and the acute accent. The following returns `true`:
20682068
20692069
iex> String.contains?(String.normalize("é", :nfd), "e")
20702070
true
20712071
20722072
However, if "é" is represented by the single character "e with acute"
2073-
accent, then it will return false:
2073+
accent, then it will return `false`:
20742074
20752075
iex> String.contains?(String.normalize("é", :nfc), "e")
20762076
false

lib/mix/lib/mix.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ defmodule Mix do
158158
Where `&clean_extra/1` would be a function in your `mix.exs`
159159
with extra cleanup logic.
160160
161-
Aliases defined in the current project do not affect its dependencies and
161+
Aliases defined in the current project do not affect its dependencies and
162162
aliases defined in dependencies are not accessible from the current project.
163163
164164
Aliases can be used very powerfully to also run Elixir scripts and
165165
bash commands, for example:
166-
166+
167167
# priv/hello.exs
168168
IO.puts("hello")
169169
@@ -179,10 +179,10 @@ defmodule Mix do
179179
]
180180
end
181181
182-
In the example above we have created 2 aliases, the first example
182+
In the example above we have created 2 aliases, the first example
183183
`taskalias` will run task `hex.info`, then (`run`)[`Mix.Tasks.Run`]
184-
to run an Elixir script, then (`cmd`)[`Mix.Tasks.Cmd`] to run a
185-
command line bash script. This shows how powerful aliases mixed
184+
to run an Elixir script, then (`cmd`)[`Mix.Tasks.Cmd`] to run a
185+
command line bash script. This shows how powerful aliases mixed
186186
with mix tasks can be.
187187
188188
`taskalias2` shows a limitation of tasks where only one of the given
@@ -302,7 +302,7 @@ defmodule Mix do
302302
end
303303

304304
@doc """
305-
Returns true if Mix is in debug mode.
305+
Returns `true` if Mix is in debug mode.
306306
"""
307307
def debug? do
308308
Mix.State.get(:debug, false)

lib/mix/lib/mix/dep.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ defmodule Mix.Dep do
422422
def diverged?(%Mix.Dep{}), do: false
423423

424424
@doc """
425-
Returns true if the depednency is compilable.
425+
Returns `true` if the depednency is compilable.
426426
"""
427427
def compilable?(%Mix.Dep{status: {:elixirlock, _}}), do: true
428428
def compilable?(%Mix.Dep{status: {:noappfile, _}}), do: true

0 commit comments

Comments
 (0)