mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
nested replacement fields may omit arg_id (#1681)
syntax.html already has examples like `fmt::format("{:.{}f}", 3.14, 1)` using this, and https://en.cppreference.com/w/cpp/utility/format/formatter#width_and_precision shows that this is the case for the C++20 std::format The Format Specification Mini-Language grammar seems to be the only one not showing this; update it to match.
This commit is contained in:
parent
922ea924bf
commit
981b517ccf
@ -79,8 +79,8 @@ The general form of a *standard format specifier* is:
|
||||
fill: <a character other than '{' or '}'>
|
||||
align: "<" | ">" | "^"
|
||||
sign: "+" | "-" | " "
|
||||
width: `integer` | "{" `arg_id` "}"
|
||||
precision: `integer` | "{" `arg_id` "}"
|
||||
width: `integer` | "{" [`arg_id`] "}"
|
||||
precision: `integer` | "{" [`arg_id`] "}"
|
||||
type: `int_type` | "a" | "A" | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "L" | "p" | "s"
|
||||
int_type: "b" | "B" | "d" | "o" | "x" | "X"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user