From 228fc8758f3a3ca3bfcb92ba95b65563a1c05a7a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 13 Dec 2012 08:01:37 -0800 Subject: [PATCH] Syntax highlight one block. Acknowledge str.format. --- README.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 042d470d..6fc28406 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,9 @@ Features Examples -------- -This prints "Hello, world!" to stdout:: +This prints "Hello, world!" to stdout: + +.. code-block:: c++ fmt::Print("Hello, {0}!") << "world"; @@ -90,7 +92,7 @@ The grammar for a replacement field is as follows: `precision`: integer | "{" `arg_index` "}" `type`: "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "o" | "p" | "s" | "x" | "X" -Preceding the `width` field with ``0`` makes the padding to be placed +Preceding the `width` field with ``0`` forces the padding to be placed after the sign (if any) but before the digits. This is used for printing fields in the form ``+000000120``. This option is only valid for numeric types. @@ -306,3 +308,5 @@ Some ideas used in the implementation are borrowed from `Loki `__ SafeFormat and `Diagnostic API `__ in `Clang `__. +Format string syntax is based on Python's `str.format +`__.