Update docs
This commit is contained in:
parent
2eb0be0b73
commit
9795d87348
10
doc/build.py
10
doc/build.py
@ -97,12 +97,10 @@ def build_docs(version='dev', **kwargs):
|
|||||||
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
|
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
|
||||||
'-b', 'html', doc_dir, html_dir])
|
'-b', 'html', doc_dir, html_dir])
|
||||||
try:
|
try:
|
||||||
cmd = ['lessc', '--verbose', '--clean-css',
|
check_call(['lessc', '--verbose', '--clean-css',
|
||||||
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
|
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
|
||||||
os.path.join(doc_dir, 'fmt.less'),
|
os.path.join(doc_dir, 'fmt.less'),
|
||||||
os.path.join(html_dir, '_static', 'fmt.css')]
|
os.path.join(html_dir, '_static', 'fmt.css')])
|
||||||
print("Running {}".format(cmd))
|
|
||||||
check_call(cmd)
|
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.ENOENT:
|
if e.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
|
@ -16,7 +16,7 @@ literal text, it can be escaped by doubling: ``{{`` and ``}}``.
|
|||||||
The grammar for a replacement field is as follows:
|
The grammar for a replacement field is as follows:
|
||||||
|
|
||||||
.. productionlist:: sf
|
.. productionlist:: sf
|
||||||
replacement_field: "{" [`arg_id`] [":" `format_spec`] "}"
|
replacement_field: "{" [`arg_id`] [":" (`format_spec` | `chrono_format_spec`)] "}"
|
||||||
arg_id: `integer` | `identifier`
|
arg_id: `integer` | `identifier`
|
||||||
integer: `digit`+
|
integer: `digit`+
|
||||||
digit: "0"..."9"
|
digit: "0"..."9"
|
||||||
@ -27,8 +27,8 @@ The grammar for a replacement field is as follows:
|
|||||||
In less formal terms, the replacement field can start with an *arg_id*
|
In less formal terms, the replacement field can start with an *arg_id*
|
||||||
that specifies the argument whose value is to be formatted and inserted into
|
that specifies the argument whose value is to be formatted and inserted into
|
||||||
the output instead of the replacement field.
|
the output instead of the replacement field.
|
||||||
The *arg_id* is optionally followed by a *format_spec*, which is preceded
|
The *arg_id* is optionally followed by a *format_spec*, which is preceded by a
|
||||||
by a colon ``':'``. These specify a non-default format for the replacement value.
|
colon ``':'``. These specify a non-default format for the replacement value.
|
||||||
|
|
||||||
See also the :ref:`formatspec` section.
|
See also the :ref:`formatspec` section.
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ The general form of a *standard format specifier* is:
|
|||||||
sign: "+" | "-" | " "
|
sign: "+" | "-" | " "
|
||||||
width: `integer` | "{" [`arg_id`] "}"
|
width: `integer` | "{" [`arg_id`] "}"
|
||||||
precision: `integer` | "{" [`arg_id`] "}"
|
precision: `integer` | "{" [`arg_id`] "}"
|
||||||
type: `int_type` | "a" | "A" | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "L" | "p" | "s"
|
type: "a" | "A" | "b" | "B" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" |
|
||||||
int_type: "b" | "B" | "d" | "o" | "x" | "X"
|
: "L" | "o" | "p" | "s" | "x" | "X"
|
||||||
|
|
||||||
The *fill* character can be any Unicode code point other than ``'{'`` or
|
The *fill* character can be any Unicode code point other than ``'{'`` or
|
||||||
``'}'``. The presence of a fill character is signaled by the character following
|
``'}'``. The presence of a fill character is signaled by the character following
|
||||||
@ -317,9 +317,9 @@ Format specifications for chrono types have the following syntax:
|
|||||||
literal_char: <a character other than '{', '}' or '%'>
|
literal_char: <a character other than '{', '}' or '%'>
|
||||||
modifier: "E" | "O"
|
modifier: "E" | "O"
|
||||||
chrono_type: "a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" | "F" |
|
chrono_type: "a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" | "F" |
|
||||||
"g" | "G" | "h" | "H" | "I" | "j" | "m" | "M" | "n" | "p" |
|
: "g" | "G" | "h" | "H" | "I" | "j" | "m" | "M" | "n" | "p" |
|
||||||
"q" | "Q" | "r" | "R" | "S" | "t" | "T" | "u" | "U" | "V" |
|
: "q" | "Q" | "r" | "R" | "S" | "t" | "T" | "u" | "U" | "V" |
|
||||||
"w" | "W" | "x" | "X" | "y" | "Y" | "z" | "Z" | "%"
|
: "w" | "W" | "x" | "X" | "y" | "Y" | "z" | "Z" | "%" |
|
||||||
|
|
||||||
.. _formatexamples:
|
.. _formatexamples:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user