summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEksperimental <eksperimental@users.noreply.github.com>2018-07-11 14:52:59 +0700
committerJosé Valim <jose.valim@gmail.com>2018-07-11 09:52:59 +0200
commit473a83b6516dffa03399fa0a607a1181ad4141c4 (patch)
treeddd7c3b2f7e8d329a8cbfe498a314c82e3fcfef2
parentba6cfea7018282fc98c3a494abffcc8a04fa0053 (diff)
downloadelixir-473a83b6516dffa03399fa0a607a1181ad4141c4.tar.gz
Use backtick in "returns true" and "returns false" in docs (#7865)
[ci skip]
-rw-r--r--CHANGELOG.md2
-rw-r--r--lib/elixir/lib/calendar.ex2
-rw-r--r--lib/elixir/lib/calendar/date.ex2
-rw-r--r--lib/elixir/lib/enum.ex4
-rw-r--r--lib/elixir/lib/kernel.ex10
-rw-r--r--lib/elixir/lib/macro.ex6
-rw-r--r--lib/elixir/lib/string.ex8
-rw-r--r--lib/mix/lib/mix.ex12
-rw-r--r--lib/mix/lib/mix/dep.ex2
9 files changed, 24 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dc9d955a4..638e5b3c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -127,7 +127,7 @@ Percentage | Module
* [Kernel] Warn on unsupported nested comparisons such as `x < y < z`
* [Kernel] Warn if redefining documentation across clauses of the same definition
* [Kernel] Warn on unnecessary quotes around atoms, keywords and calls
- * [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
+ * [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
* [Macro.Env] Add `Macro.Env.vars/1` and `Macro.Env.has_var?/2` that gives access to environment data without accessing private fields
* [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
* [Registry] Add `Registry.count/1` and `Registry.count_match/4`
diff --git a/lib/elixir/lib/calendar.ex b/lib/elixir/lib/calendar.ex
index 61451bf0b..2fc032ce5 100644
--- a/lib/elixir/lib/calendar.ex
+++ b/lib/elixir/lib/calendar.ex
@@ -123,7 +123,7 @@ defmodule Calendar do
@callback months_in_year(year) :: month
@doc """
- Returns true if the given year is a leap year.
+ Returns `true` if the given year is a leap year.
A leap year is a year of a longer length than normal. The exact meaning
is up to the calendar. A calendar must return `false` if it does not support
diff --git a/lib/elixir/lib/calendar/date.ex b/lib/elixir/lib/calendar/date.ex
index 0cfb4f0aa..3b09bad6e 100644
--- a/lib/elixir/lib/calendar/date.ex
+++ b/lib/elixir/lib/calendar/date.ex
@@ -132,7 +132,7 @@ defmodule Date do
end
@doc """
- Returns true if the year in the given `date` is a leap year.
+ Returns `true` if the year in the given `date` is a leap year.
## Examples
diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex
index 8de64f72d..340307f97 100644
--- a/lib/elixir/lib/enum.ex
+++ b/lib/elixir/lib/enum.ex
@@ -273,7 +273,7 @@ defmodule Enum do
end
@doc """
- Returns true if the given `fun` evaluates to true on all of the items in the enumerable.
+ Returns `true` if the given `fun` evaluates to true on all of the items in the enumerable.
It stops the iteration at the first invocation that returns `false` or `nil`.
@@ -311,7 +311,7 @@ defmodule Enum do
end
@doc """
- Returns true if the given `fun` evaluates to true on any of the items in the enumerable.
+ Returns `true` if the given `fun` evaluates to true on any of the items in the enumerable.
It stops the iteration at the first invocation that returns a truthy value (neither `false` nor `nil`).
diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex
index 657f8e24c..96eaa5309 100644
--- a/lib/elixir/lib/kernel.ex
+++ b/lib/elixir/lib/kernel.ex
@@ -16,7 +16,7 @@ defmodule Kernel do
data type handling, etc
* macros for control-flow and defining new functionality (modules, functions, and so on)
* [guard](guards.html) checks for augmenting pattern matching
-
+
You can use `Kernel` functions/macros without the `Kernel` prefix anywhere in
Elixir code as all its functions and macros are automatically imported. For
example, in IEx:
@@ -24,11 +24,11 @@ defmodule Kernel do
iex> is_number(13)
true
- If you don't want to import a function or macro from `Kernel`, use the `:except`
+ If you don't want to import a function or macro from `Kernel`, use the `:except`
option and then list the function/macro by arity:
import Kernel, except: [if: 2, unless: 2]
-
+
See `Kernel.SpecialForms.import/2` for more information on importing.
Elixir also has special forms that are always imported and
@@ -1392,8 +1392,8 @@ defmodule Kernel do
The items are only considered to be exactly equal if they
have the same value and are of the same type. For example,
- `1 == 1.0` returns true, but since they are of different
- types, `1 === 1.0` returns false.
+ `1 == 1.0` returns `true`, but since they are of different
+ types, `1 === 1.0` returns `false`.
All terms in Elixir can be compared with each other.
diff --git a/lib/elixir/lib/macro.ex b/lib/elixir/lib/macro.ex
index 4fd932afe..8e729e422 100644
--- a/lib/elixir/lib/macro.ex
+++ b/lib/elixir/lib/macro.ex
@@ -1273,7 +1273,7 @@ defmodule Macro do
defp do_expand_once(other, _env), do: {other, false}
@doc """
- Returns true if the given name and arity is a special form.
+ Returns `true` if the given name and arity is a special form.
"""
@since "1.7.0"
@spec special_form?(name :: atom(), arity()) :: boolean()
@@ -1282,7 +1282,7 @@ defmodule Macro do
end
@doc """
- Returns true if the given name and arity is an operator.
+ Returns `true` if the given name and arity is an operator.
"""
@since "1.7.0"
@spec operator?(name :: atom(), arity()) :: boolean()
@@ -1291,7 +1291,7 @@ defmodule Macro do
def operator?(name, arity) when is_atom(name) and is_integer(arity), do: false
@doc """
- Returns true if the given quoted expression is an AST literal.
+ Returns `true` if the given quoted expression is an AST literal.
"""
@since "1.7.0"
@spec quoted_literal?(literal) :: true
diff --git a/lib/elixir/lib/string.ex b/lib/elixir/lib/string.ex
index 358d30a61..6e21ab7d2 100644
--- a/lib/elixir/lib/string.ex
+++ b/lib/elixir/lib/string.ex
@@ -389,13 +389,13 @@ defmodule String do
Note this function can split within or across grapheme boundaries.
For example, take the grapheme "é" which is made of the characters
- "e" and the acute accent. The following returns true:
+ "e" and the acute accent. The following returns `true`:
iex> String.split(String.normalize("é", :nfd), "e")
["", "́"]
However, if "é" is represented by the single character "e with acute"
- accent, then it will return false:
+ accent, then it will return `false`:
iex> String.split(String.normalize("é", :nfc), "e")
["é"]
@@ -2064,13 +2064,13 @@ defmodule String do
Note this function can match within or across grapheme boundaries.
For example, take the grapheme "é" which is made of the characters
- "e" and the acute accent. The following returns true:
+ "e" and the acute accent. The following returns `true`:
iex> String.contains?(String.normalize("é", :nfd), "e")
true
However, if "é" is represented by the single character "e with acute"
- accent, then it will return false:
+ accent, then it will return `false`:
iex> String.contains?(String.normalize("é", :nfc), "e")
false
diff --git a/lib/mix/lib/mix.ex b/lib/mix/lib/mix.ex
index b1468d137..c6b8d9260 100644
--- a/lib/mix/lib/mix.ex
+++ b/lib/mix/lib/mix.ex
@@ -158,12 +158,12 @@ defmodule Mix do
Where `&clean_extra/1` would be a function in your `mix.exs`
with extra cleanup logic.
- Aliases defined in the current project do not affect its dependencies and
+ Aliases defined in the current project do not affect its dependencies and
aliases defined in dependencies are not accessible from the current project.
Aliases can be used very powerfully to also run Elixir scripts and
bash commands, for example:
-
+
# priv/hello.exs
IO.puts("hello")
@@ -179,10 +179,10 @@ defmodule Mix do
]
end
- In the example above we have created 2 aliases, the first example
+ In the example above we have created 2 aliases, the first example
`taskalias` will run task `hex.info`, then (`run`)[`Mix.Tasks.Run`]
- to run an Elixir script, then (`cmd`)[`Mix.Tasks.Cmd`] to run a
- command line bash script. This shows how powerful aliases mixed
+ to run an Elixir script, then (`cmd`)[`Mix.Tasks.Cmd`] to run a
+ command line bash script. This shows how powerful aliases mixed
with mix tasks can be.
`taskalias2` shows a limitation of tasks where only one of the given
@@ -302,7 +302,7 @@ defmodule Mix do
end
@doc """
- Returns true if Mix is in debug mode.
+ Returns `true` if Mix is in debug mode.
"""
def debug? do
Mix.State.get(:debug, false)
diff --git a/lib/mix/lib/mix/dep.ex b/lib/mix/lib/mix/dep.ex
index 7ebac4b68..2182759c3 100644
--- a/lib/mix/lib/mix/dep.ex
+++ b/lib/mix/lib/mix/dep.ex
@@ -422,7 +422,7 @@ defmodule Mix.Dep do
def diverged?(%Mix.Dep{}), do: false
@doc """
- Returns true if the depednency is compilable.
+ Returns `true` if the depednency is compilable.
"""
def compilable?(%Mix.Dep{status: {:elixirlock, _}}), do: true
def compilable?(%Mix.Dep{status: {:noappfile, _}}), do: true