From 26c6387b3bfc90d4969d9d40b95bed77d216f9ce Mon Sep 17 00:00:00 2001
From: fmtbot
Date: Sat, 30 Mar 2024 22:55:25 +0000
Subject: [PATCH] Update documentation
---
dev/_sources/syntax.rst.txt | 19 ++++++++++---------
dev/syntax.html | 38 ++++++++-----------------------------
2 files changed, 18 insertions(+), 39 deletions(-)
diff --git a/dev/_sources/syntax.rst.txt b/dev/_sources/syntax.rst.txt
index 557e4fd0..16326c28 100644
--- a/dev/_sources/syntax.rst.txt
+++ b/dev/_sources/syntax.rst.txt
@@ -491,7 +491,7 @@ 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.
@@ -500,23 +500,24 @@ The available presentation types for `range_type` are:
+---------+----------------------------------------------------------+
| Type | Meaning |
+=========+==========================================================+
+| none | Default format. |
++---------+----------------------------------------------------------+
| ``'s'`` | String format. The range is formatted as a string. |
+---------+----------------------------------------------------------+
| ``'?s'``| Debug format. The range is formatted as an escaped |
| | string. |
+---------+----------------------------------------------------------+
-| none | Default format. The range is formatted with a separator. |
-+---------+----------------------------------------------------------+
-If `range_type` is ``'s'`` or ``'?s'``, the range element type 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 range element type must be a
+character type. The ``'n'`` option and `range_underlying_spec` are mutually
+exclusive with ``'s'`` and ``'?s'``.
The `range_underlying_spec` is parsed based on the formatter of the range's
-reference type.
+element type.
-By default, a range of characters or strings is printed escaped and quoted. But
-if any `range_underlying_spec` is provided (even if it is empty), then the characters
-or strings are printed according to the provided specification.
+By default, a range of characters or strings is printed escaped and quoted.
+But 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::
diff --git a/dev/syntax.html b/dev/syntax.html
index 8c70b128..9c71d856 100644
--- a/dev/syntax.html
+++ b/dev/syntax.html
@@ -690,40 +690,18 @@
Range Format Specifications
Format specifications for range types have the following syntax:
-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 available presentation types for range_type
are:
-
-
-
-
-
-
-Type |
-Meaning |
-
-
-
-'s'
|
-String format. The range is formatted as a string. |
-
-'?s'
|
-Debug format. The range is formatted as an escaped
-string. |
-
-none |
-Default format. The range is formatted with a separator. |
-
-
-
-If range_type
is 's'
or '?s'
, the range element type 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 range element type must be a
+character type. The 'n'
option and range_underlying_spec
are mutually
+exclusive with 's'
and '?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 range_underlying_spec
is provided (even if it is empty), then the characters
-or strings are printed according to the provided specification.
+element type.
+By default, a range of characters or strings is printed escaped and quoted.
+But 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:
fmt::format("{}", std::vector{10, 20, 30});
// Result: [10, 20, 30]