   The format for referring to sequences is `%{red}` and `%{red,bright}` (for
   multiple sequences).
 
-  It will also append a %{reset} to the string. If you don't want this
-  behaviour, use `escape_fragment/1` and `escape_fragment/2`.
+  It will also append a `%{reset}` to the string. If you don't want this
+  behaviour, use `escape_fragment/2`.
 
   An optional boolean parameter can be passed to enable or disable
-  emitting actual ANSI codes. When false, no ANSI codes will emitted.
+  emitting actual ANSI codes. When `false`, no ANSI codes will emitted.
   By default, standard output will be checked if it is a terminal capable
-  of handling these sequences (using `terminal?/0` function)
-
-  ## Example
+  of handling these sequences (using `terminal?/1` function)
+
+  ## Examples
 
       iex> IO.ANSI.escape("Hello %{red,bright,green}yes", true)
       "Hello \e[31m\e[1m\e[32myes\e[0m"

  Checks whether the default I/O device is a terminal or a file.

  Used to identify whether printing ANSI escape sequences will likely
  be printed as intended.
  """
  @spec terminal? :: boolean
  @spec terminal?(:io.device) :: boolean

  multiple sequences).

  An optional boolean parameter can be passed to enable or disable
  emitting actual ANSI codes. When `false`, no ANSI codes will emitted.
  By default, standard output will be checked if it is a terminal capable
  of handling these sequences (using `terminal?/1` function)

  ## Examples

      iex> IO.ANSI.escape_fragment("Hello %{red,bright,green}yes", true)
      "Hello \e[31m\e[1m\e[32myes"
      iex> IO.ANSI.escape_fragment("%{reset}bye", true)
      "\e[0mbye"

  """
  @spec escape_fragment(String.t, emit :: boolean) :: String.t
