Skip to content

Commit

Permalink
change formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
js324 committed Mar 22, 2024
1 parent fe0a6b7 commit 8af29e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ Range Format Specifications
Format specifications for range types have the following syntax:

.. productionlist:: sf
range_format_spec: [":" [`n`][`range_type`][`range_underlying_spec`]]
range_format_spec: [":" ["n"][`range_type`][`range_underlying_spec`]]

The `n` option formats the range without the opening and closing brackets.
The ``'n'`` option formats the range without the opening and closing brackets.

The available presentation types for `range_type` are:

Expand All @@ -505,18 +505,18 @@ The available presentation types for `range_type` are:
| ``'?s'``| Debug format. The range is formatted as an escaped |
| | string. |
+---------+----------------------------------------------------------+
| none | Default format. The range is formatted with a separator |
| none | Default format. The range is formatted with a separator. |
| | |
+---------+----------------------------------------------------------+

If `range_type` is `s` or `?s`, the underlying type of the range must be a character type. The
`n` option and `range_underlying_spec` are mutually exclusive with `s` and `?s`.
If `range_type` is ``'s'`` or ``'?s'``, the underlying type of the range must be a character type. The
``'n'`` option and `range_underlying_spec` are mutually exclusive with ``'s'`` and ``'?s'``.

The `underlying_spec` is parsed based on the formatter of the range's
The `range_underlying_spec` is parsed based on the formatter of the range's
reference type.

By default, a range of characters or strings is printed escaped and quoted. But
if any `underlying_spec` is provided (even if it is empty), then the characters
if any `range_underlying_spec` is provided (even if it is empty), then the characters
or strings are printed according to the provided specification.

Examples::
Expand Down

0 comments on commit 8af29e0

Please sign in to comment.