From 25e7befa37d4abfae925db6ac20502ddd41a8e7d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 26 Oct 2013 08:29:21 +0200 Subject: [PATCH] fixed CS in docs --- doc/filters/batch.rst | 34 ++++++++++++++++---------------- doc/filters/convert_encoding.rst | 4 +- doc/filters/date.rst | 6 ++-- doc/filters/date_modify.rst | 2 +- doc/filters/default.rst | 2 +- doc/filters/escape.rst | 4 +- doc/filters/join.rst | 2 +- doc/filters/json_encode.rst | 4 +- doc/filters/length.rst | 1 - doc/filters/number_format.rst | 12 +++++----- doc/filters/replace.rst | 2 +- doc/filters/reverse.rst | 2 +- doc/filters/slice.rst | 6 ++-- doc/filters/split.rst | 4 +- doc/filters/trim.rst | 2 +- doc/functions/cycle.rst | 2 +- doc/functions/date.rst | 4 +- doc/functions/dump.rst | 2 +- doc/functions/include.rst | 10 ++++---- doc/functions/random.rst | 2 +- doc/functions/range.rst | 6 ++-- doc/functions/template_from_string.rst | 2 +- doc/templates.rst | 2 +- 23 files changed, 58 insertions(+), 59 deletions(-) diff --git a/doc/filters/batch.rst b/doc/filters/batch.rst index 4366b57..b0b9964 100644 --- a/doc/filters/batch.rst +++ b/doc/filters/batch.rst @@ -14,11 +14,11 @@ missing items: {% for row in items|batch(3, 'No item') %} - - {% for column in row %} - - {% endfor %} - + + {% for column in row %} + + {% endfor %} + {% endfor %}
{{ column }}
{{ column }}
@@ -27,19 +27,19 @@ The above example will be rendered as: .. code-block:: jinja - - - - + + + + - - - - + + + + - - - - + + + +
abc
abc
def
def
gNo itemNo item
gNo itemNo item
diff --git a/doc/filters/convert_encoding.rst b/doc/filters/convert_encoding.rst index 1b0eb60..c417e12 100644 --- a/doc/filters/convert_encoding.rst +++ b/doc/filters/convert_encoding.rst @@ -21,8 +21,8 @@ is the input charset: Arguments --------- - * ``from``: The input charset - * ``to``: The output charset +* ``from``: The input charset +* ``to``: The output charset .. _`iconv`: http://php.net/iconv .. _`mbstring`: http://php.net/mbstring diff --git a/doc/filters/date.rst b/doc/filters/date.rst index 1b40913..c86d42b 100644 --- a/doc/filters/date.rst +++ b/doc/filters/date.rst @@ -18,7 +18,7 @@ The ``date`` filter formats a date to a given format: .. code-block:: jinja {{ post.published_at|date("m/d/Y") }} - + The format specifier is the same as supported by `date`_, except when the filtered data is of type `DateInterval`_, when the format must conform to `DateInterval::format`_ instead. @@ -84,8 +84,8 @@ The default timezone can also be set globally by calling ``setTimezone()``: Arguments --------- - * ``format``: The date format - * ``timezone``: The date timezone +* ``format``: The date format +* ``timezone``: The date timezone .. _`strtotime`: http://www.php.net/strtotime .. _`DateTime`: http://www.php.net/DateTime diff --git a/doc/filters/date_modify.rst b/doc/filters/date_modify.rst index 6a5c73d..add40b5 100644 --- a/doc/filters/date_modify.rst +++ b/doc/filters/date_modify.rst @@ -17,7 +17,7 @@ it with the :doc:`date` filter for formatting. Arguments --------- - * ``modifier``: The modifier +* ``modifier``: The modifier .. _`strtotime`: http://www.php.net/strtotime .. _`DateTime`: http://www.php.net/DateTime diff --git a/doc/filters/default.rst b/doc/filters/default.rst index 46ed963..641ac6e 100644 --- a/doc/filters/default.rst +++ b/doc/filters/default.rst @@ -30,4 +30,4 @@ undefined: Arguments --------- - * ``default``: The default value +* ``default``: The default value diff --git a/doc/filters/escape.rst b/doc/filters/escape.rst index ad441de..fc9771a 100644 --- a/doc/filters/escape.rst +++ b/doc/filters/escape.rst @@ -110,7 +110,7 @@ string to escape, and the charset. Arguments --------- - * ``strategy``: The escaping strategy - * ``charset``: The string charset +* ``strategy``: The escaping strategy +* ``charset``: The string charset .. _`htmlspecialchars`: http://php.net/htmlspecialchars diff --git a/doc/filters/join.rst b/doc/filters/join.rst index f495242..be10b86 100644 --- a/doc/filters/join.rst +++ b/doc/filters/join.rst @@ -20,4 +20,4 @@ define it with the optional first parameter: Arguments --------- - * ``glue``: The separator +* ``glue``: The separator diff --git a/doc/filters/json_encode.rst b/doc/filters/json_encode.rst index 4a7d64e..9821b11 100644 --- a/doc/filters/json_encode.rst +++ b/doc/filters/json_encode.rst @@ -14,8 +14,8 @@ The ``json_encode`` filter returns the JSON representation of a string: Arguments --------- - * ``options``: A bitmask of `json_encode options`_ (``{{ - data|json_encode(constant('JSON_PRETTY_PRINT')) }}``) +* ``options``: A bitmask of `json_encode options`_ (``{{ + data|json_encode(constant('JSON_PRETTY_PRINT')) }}``) .. _`json_encode`: http://php.net/json_encode .. _`json_encode options`: http://www.php.net/manual/en/json.constants.php diff --git a/doc/filters/length.rst b/doc/filters/length.rst index f79b9bd..5e0f73a 100644 --- a/doc/filters/length.rst +++ b/doc/filters/length.rst @@ -9,4 +9,3 @@ the length of a string: {% if users|length > 10 %} ... {% endif %} - diff --git a/doc/filters/number_format.rst b/doc/filters/number_format.rst index 7434c53..3e60691 100644 --- a/doc/filters/number_format.rst +++ b/doc/filters/number_format.rst @@ -21,9 +21,9 @@ separator using the additional arguments: If no formatting options are provided then Twig will use the default formatting options of: -- 0 decimal places. -- ``.`` as the decimal point. -- ``,`` as the thousands separator. +* 0 decimal places. +* ``.`` as the decimal point. +* ``,`` as the thousands separator. These defaults can be easily changed through the core extension: @@ -38,8 +38,8 @@ additional parameters. Arguments --------- - * ``decimal``: The number of decimal points to display - * ``decimal_point``: The character(s) to use for the decimal point - * ``thousand_sep``: The character(s) to use for the thousands separator +* ``decimal``: The number of decimal points to display +* ``decimal_point``: The character(s) to use for the decimal point +* ``thousand_sep``: The character(s) to use for the thousands separator .. _`number_format`: http://php.net/number_format diff --git a/doc/filters/replace.rst b/doc/filters/replace.rst index e961f23..1ab3b38 100644 --- a/doc/filters/replace.rst +++ b/doc/filters/replace.rst @@ -14,6 +14,6 @@ The ``replace`` filter formats a given string by replacing the placeholders Arguments --------- - * ``replace_pairs``: The placeholder values +* ``replace_pairs``: The placeholder values .. seealso:: :doc:`format` diff --git a/doc/filters/reverse.rst b/doc/filters/reverse.rst index 752192b..76fd2c1 100644 --- a/doc/filters/reverse.rst +++ b/doc/filters/reverse.rst @@ -42,6 +42,6 @@ The ``reverse`` filter reverses a sequence, a mapping, or a string: Arguments --------- - * ``preserve_keys``: Preserve keys when reversing a mapping or a sequence. +* ``preserve_keys``: Preserve keys when reversing a mapping or a sequence. .. _`Traversable`: http://php.net/Traversable diff --git a/doc/filters/slice.rst b/doc/filters/slice.rst index dbd5db3..c76c61c 100644 --- a/doc/filters/slice.rst +++ b/doc/filters/slice.rst @@ -61,9 +61,9 @@ up until the end of the variable. Arguments --------- - * ``start``: The start of the slice - * ``length``: The size of the slice - * ``preserve_keys``: Whether to preserve key or not (when the input is an array) +* ``start``: The start of the slice +* ``length``: The size of the slice +* ``preserve_keys``: Whether to preserve key or not (when the input is an array) .. _`Traversable`: http://php.net/manual/en/class.traversable.php .. _`array_slice`: http://php.net/array_slice diff --git a/doc/filters/split.rst b/doc/filters/split.rst index 7cd2ca5..3db8141 100644 --- a/doc/filters/split.rst +++ b/doc/filters/split.rst @@ -46,8 +46,8 @@ chunks. Length is set by the ``limit`` argument (one character by default). Arguments --------- - * ``delimiter``: The delimiter - * ``limit``: The limit argument +* ``delimiter``: The delimiter +* ``limit``: The limit argument .. _`explode`: http://php.net/explode .. _`str_split`: http://php.net/str_split diff --git a/doc/filters/trim.rst b/doc/filters/trim.rst index f38afd5..0c5b32e 100644 --- a/doc/filters/trim.rst +++ b/doc/filters/trim.rst @@ -24,6 +24,6 @@ and end of a string: Arguments --------- - * ``character_mask``: The characters to strip +* ``character_mask``: The characters to strip .. _`trim`: http://php.net/trim diff --git a/doc/functions/cycle.rst b/doc/functions/cycle.rst index 0015cae..94f7008 100644 --- a/doc/functions/cycle.rst +++ b/doc/functions/cycle.rst @@ -22,4 +22,4 @@ The array can contain any number of values: Arguments --------- - * ``position``: The cycle position +* ``position``: The cycle position diff --git a/doc/functions/date.rst b/doc/functions/date.rst index f1c9481..9442c39 100644 --- a/doc/functions/date.rst +++ b/doc/functions/date.rst @@ -46,7 +46,7 @@ If no argument is passed, the function returns the current date: Arguments --------- - * ``date``: The date - * ``timezone``: The timezone +* ``date``: The date +* ``timezone``: The timezone .. _`date`: http://www.php.net/date diff --git a/doc/functions/dump.rst b/doc/functions/dump.rst index 1500b0f..54f8d4e 100644 --- a/doc/functions/dump.rst +++ b/doc/functions/dump.rst @@ -63,7 +63,7 @@ dumped: Arguments --------- - * ``context``: The context to dump +* ``context``: The context to dump .. _`XDebug`: http://xdebug.org/docs/display .. _`var_dump`: http://php.net/var_dump diff --git a/doc/functions/include.rst b/doc/functions/include.rst index eaddfe6..8feb0f1 100644 --- a/doc/functions/include.rst +++ b/doc/functions/include.rst @@ -73,8 +73,8 @@ sandboxing it: Arguments --------- - * ``template``: The template to render - * ``variables``: The variables to pass to the template - * ``with_context``: Whether to pass the current context variables or not - * ``ignore_missing``: Whether to ignore missing templates or not - * ``sandboxed``: Whether to sandbox the template or not +* ``template``: The template to render +* ``variables``: The variables to pass to the template +* ``with_context``: Whether to pass the current context variables or not +* ``ignore_missing``: Whether to ignore missing templates or not +* ``sandboxed``: Whether to sandbox the template or not diff --git a/doc/functions/random.rst b/doc/functions/random.rst index a5a916b..fcca661 100644 --- a/doc/functions/random.rst +++ b/doc/functions/random.rst @@ -24,6 +24,6 @@ parameter type: Arguments --------- - * ``values``: The values +* ``values``: The values .. _`mt_rand`: http://php.net/mt_rand diff --git a/doc/functions/range.rst b/doc/functions/range.rst index b1fa547..dac0e9b 100644 --- a/doc/functions/range.rst +++ b/doc/functions/range.rst @@ -38,8 +38,8 @@ function (with a step of 1): Arguments --------- - * ``low``: The first value of the sequence. - * ``high``: The highest possible value of the sequence. - * ``step``: The increment between elements of the sequence. +* ``low``: The first value of the sequence. +* ``high``: The highest possible value of the sequence. +* ``step``: The increment between elements of the sequence. .. _`range`: http://php.net/range diff --git a/doc/functions/template_from_string.rst b/doc/functions/template_from_string.rst index f21d91f..95d9256 100644 --- a/doc/functions/template_from_string.rst +++ b/doc/functions/template_from_string.rst @@ -29,4 +29,4 @@ The ``template_from_string`` function loads a template from a string: Arguments --------- - * ``template``: The template +* ``template``: The template diff --git a/doc/templates.rst b/doc/templates.rst index a191072..03377ec 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -167,7 +167,7 @@ To apply a filter on a section of code, wrap it with the .. code-block:: jinja {% filter upper %} - This text becomes uppercase + This text becomes uppercase {% endfilter %} Go to the :doc:`filters` page to learn more about the built-in -- 1.7.2.5