From a136b748039bad1245ffbf61ea61956acfce7b2b Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Wed, 4 Sep 2019 17:57:46 -0400 Subject: [PATCH] Grammar and word choice improvements for readability --- _basics/whitespace.md | 4 ++-- _filters/abs.md | 4 ++-- _filters/at_least.md | 2 +- _filters/at_most.md | 2 +- _filters/capitalize.md | 4 ++-- _filters/ceil.md | 2 +- _filters/divided_by.md | 2 +- _filters/downcase.md | 2 +- _filters/first.md | 2 +- _filters/floor.md | 4 ++-- _filters/last.md | 4 ++-- _filters/lstrip.md | 4 ++-- _filters/minus.md | 2 +- _filters/modulo.md | 2 +- _filters/newline_to_br.md | 4 ++-- _filters/plus.md | 2 +- _filters/prepend.md | 2 +- _filters/replace.md | 2 +- _filters/reverse.md | 2 +- _filters/round.md | 2 +- _filters/rstrip.md | 2 +- _filters/size.md | 2 +- _filters/slice.md | 4 ++-- _filters/sort.md | 2 +- _filters/sort_natural.md | 2 +- _filters/split.md | 2 +- _filters/strip.md | 4 ++-- _filters/truncate.md | 8 ++++---- _filters/truncatewords.md | 8 ++++---- _filters/upcase.md | 2 +- _tags/comment.md | 2 +- _tags/iteration.md | 6 +++--- _tags/variable.md | 6 +++--- 33 files changed, 52 insertions(+), 52 deletions(-) diff --git a/_basics/whitespace.md b/_basics/whitespace.md index 3dc8ec17..4dd20e58 100644 --- a/_basics/whitespace.md +++ b/_basics/whitespace.md @@ -5,7 +5,7 @@ description: An overview of controlling whitespace between code in the Liquid te In Liquid, you can include a hyphen in your tag syntax `{% raw %}{{-{% endraw %}`, `{% raw %}-}}{% endraw %}`, `{% raw %}{%-{% endraw %}`, and `{% raw %}-%}{% endraw %}` to strip whitespace from the left or right side of a rendered tag. -Normally, even if it doesn't output text, any line of Liquid in your template will still output a blank line in your rendered HTML: +Normally, even if it doesn't print text, any line of Liquid in your template will still print a blank line in your rendered HTML:

Input

```liquid @@ -38,7 +38,7 @@ By including hyphens in your `assign` tag, you can strip the generated whitespac tomato ``` -If you don't want any of your tags to output whitespace, as a general rule you can add hyphens to both sides of all your tags (`{% raw %}{%-{% endraw %}` and `{% raw %}-%}{% endraw %}`): +If you don't want any of your tags to print whitespace, as a general rule you can add hyphens to both sides of all your tags (`{% raw %}{%-{% endraw %}` and `{% raw %}-%}{% endraw %}`):

Input

```liquid diff --git a/_filters/abs.md b/_filters/abs.md index e244fd1f..ee28e19b 100644 --- a/_filters/abs.md +++ b/_filters/abs.md @@ -1,6 +1,6 @@ --- title: abs -description: Liquid filter that gets the absolute value of a number. +description: Liquid filter that returns the absolute value of a number. redirect_from: /filters/ --- @@ -30,7 +30,7 @@ Returns the absolute value of a number. {{ 4 | abs }} ``` -`abs` will also work on a string if the string only contains a number. +`abs` will also work on a string that only contains a number:

Input

```liquid diff --git a/_filters/at_least.md b/_filters/at_least.md index 985ad485..3bb2b141 100644 --- a/_filters/at_least.md +++ b/_filters/at_least.md @@ -1,6 +1,6 @@ --- title: at_least -description: Liquid filter that limits a number to a minimum value +description: Liquid filter that limits a number to a minimum value. --- Limits a number to a minimum value. diff --git a/_filters/at_most.md b/_filters/at_most.md index 68d5f8f0..9599ee21 100644 --- a/_filters/at_most.md +++ b/_filters/at_most.md @@ -1,6 +1,6 @@ --- title: at_most -description: Liquid filter that limits a number to a maximum value +description: Liquid filter that limits a number to a maximum value. --- Limits a number to a maximum value. diff --git a/_filters/capitalize.md b/_filters/capitalize.md index 0631aff5..72a461e3 100644 --- a/_filters/capitalize.md +++ b/_filters/capitalize.md @@ -1,6 +1,6 @@ --- title: capitalize -description: Liquid filter that capitalizes the first character in a string. +description: Liquid filter that capitalizes the first character of a string. --- Makes the first character of a string capitalized. @@ -17,7 +17,7 @@ Makes the first character of a string capitalized. {{ "title" | capitalize }} ``` -`capitalize` only capitalizes the first character of the string, so later words are not affected: +`capitalize` only capitalizes the first character of a string, so later words are not affected:

Input

```liquid diff --git a/_filters/ceil.md b/_filters/ceil.md index bfecfe48..debc6888 100644 --- a/_filters/ceil.md +++ b/_filters/ceil.md @@ -1,6 +1,6 @@ --- title: ceil -description: Liquid filter that gets the ceiling of a number by rounding up to the nearest integer. +description: Liquid filter that returns the ceiling of a number by rounding up to the nearest integer. --- Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied. diff --git a/_filters/divided_by.md b/_filters/divided_by.md index fa43cb6f..f87d9b19 100644 --- a/_filters/divided_by.md +++ b/_filters/divided_by.md @@ -3,7 +3,7 @@ title: divided_by description: Liquid filter that divides a number by another number. --- -Divides a number by the specified number. +Divides a number by another number. The result is rounded down to the nearest integer (that is, the [floor]({{ "/filters/floor/" | prepend: site.baseurl }})) if the divisor is an integer. diff --git a/_filters/downcase.md b/_filters/downcase.md index d08224cd..e66239ef 100644 --- a/_filters/downcase.md +++ b/_filters/downcase.md @@ -1,6 +1,6 @@ --- title: downcase -description: Liquid filter that coverts a string to lowercase. +description: Liquid filter that converts a string to lowercase. --- Makes each character in a string lowercase. It has no effect on strings which are already all lowercase. diff --git a/_filters/first.md b/_filters/first.md index 450cfc39..a5345975 100644 --- a/_filters/first.md +++ b/_filters/first.md @@ -33,7 +33,7 @@ Returns the first item of an array. {{ my_array.first }} ``` -You can use `first` with dot notation when you need to use the filter inside a tag. +You can use `first` with dot notation when you need to use the filter inside a tag: ```liquid {% raw %} diff --git a/_filters/floor.md b/_filters/floor.md index 3e6a597a..1b126978 100644 --- a/_filters/floor.md +++ b/_filters/floor.md @@ -1,9 +1,9 @@ --- title: floor -description: Liquid filter that gets the floor of a number by rounding down to the nearest integer. +description: Liquid filter that returns the floor of a number by rounding down to the nearest integer. --- -Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied. +Rounds the input down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.

Input

```liquid diff --git a/_filters/last.md b/_filters/last.md index 50e14f89..5337abbe 100644 --- a/_filters/last.md +++ b/_filters/last.md @@ -1,6 +1,6 @@ --- title: last -description: Liquid filter that gets the last value in an array. +description: Liquid filter that returns the last item of an array. --- Returns the last item of an array. @@ -33,7 +33,7 @@ Returns the last item of an array. {{ my_array.last }} ``` -You can use `last` with dot notation when you need to use the filter inside a tag. +You can use `last` with dot notation when you need to use the filter inside a tag: ```liquid {% raw %} diff --git a/_filters/lstrip.md b/_filters/lstrip.md index be8c19c6..c9b92940 100644 --- a/_filters/lstrip.md +++ b/_filters/lstrip.md @@ -1,9 +1,9 @@ --- title: lstrip -description: Liquid filter that removes whitespace from the left side of a string. +description: Liquid filter that removes all whitespace from the left side of a string. --- -Removes all whitespaces (tabs, spaces, and newlines) from the beginning of a string. The filter does not affect spaces between words. +Removes all whitespace (tabs, spaces, and newlines) from the left side of a string. It does not affect spaces between words.

Input

```liquid diff --git a/_filters/minus.md b/_filters/minus.md index 0b0ffc78..d1f65b5a 100644 --- a/_filters/minus.md +++ b/_filters/minus.md @@ -1,6 +1,6 @@ --- title: minus -description: Liquid filter that subtracts one number from another. +description: Liquid filter that subtracts one number from another number. --- Subtracts a number from another number. diff --git a/_filters/modulo.md b/_filters/modulo.md index 38e538c4..17e79bc3 100644 --- a/_filters/modulo.md +++ b/_filters/modulo.md @@ -1,6 +1,6 @@ --- title: modulo -description: Liquid filter that returns the remainder from a division operation. +description: Liquid filter that returns the remainder of a division operation. --- Returns the remainder of a division operation. diff --git a/_filters/newline_to_br.md b/_filters/newline_to_br.md index 5b694dad..89b280d0 100644 --- a/_filters/newline_to_br.md +++ b/_filters/newline_to_br.md @@ -1,9 +1,9 @@ --- title: newline_to_br -description: Liquid filter that converts newlines in an input string to HTML
tags. +description: Liquid filter that converts newlines in a string to HTML
tags. --- -Replaces every newline (`\n`) with an HTML line break (`
`). +Replaces every newline (`\n`) in a string with an HTML line break (`
`).

Input

```liquid diff --git a/_filters/plus.md b/_filters/plus.md index 0347f599..11002205 100644 --- a/_filters/plus.md +++ b/_filters/plus.md @@ -1,6 +1,6 @@ --- title: plus -description: Liquid filter that adds a number to another number. +description: Liquid filter that adds one number to another number. --- Adds a number to another number. diff --git a/_filters/prepend.md b/_filters/prepend.md index c5d32e5c..5df4708b 100644 --- a/_filters/prepend.md +++ b/_filters/prepend.md @@ -17,7 +17,7 @@ Adds the specified string to the beginning of another string. {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }} ``` -You can also `prepend` variables: +`prepend` can also be used with variables:

Input

```liquid diff --git a/_filters/replace.md b/_filters/replace.md index c01e419e..aba612f9 100644 --- a/_filters/replace.md +++ b/_filters/replace.md @@ -3,7 +3,7 @@ title: replace description: Liquid filter that replaces all occurences of a given substring in a string. --- -Replaces every occurrence of an argument in a string with the second argument. +Replaces every occurrence of the first argument in a string with the second argument.

Input

```liquid diff --git a/_filters/reverse.md b/_filters/reverse.md index 87c3b6b2..3832f67c 100644 --- a/_filters/reverse.md +++ b/_filters/reverse.md @@ -21,7 +21,7 @@ Reverses the order of the items in an array. `reverse` cannot reverse a string. {{ my_array | reverse | join: ", " }} ``` -`reverse` cannot be used directly on a string, but you can split a string into an array, reverse the array, and rejoin it by chaining together filters: +Although `reverse` cannot be used directly on a string, you can split a string into an array, reverse the array, and rejoin it by chaining together filters:

Input

```liquid diff --git a/_filters/round.md b/_filters/round.md index 40c83089..d95c4fa7 100644 --- a/_filters/round.md +++ b/_filters/round.md @@ -3,7 +3,7 @@ title: round description: Liquid filter that rounds a number to the nearest integer. --- -Rounds an input number to the nearest integer or, if a number is specified as an argument, to that number of decimal places. +Rounds a number to the nearest integer or, if a number is passed as an argument, to that number of decimal places.

Input

```liquid diff --git a/_filters/rstrip.md b/_filters/rstrip.md index 649c922c..25e64f26 100644 --- a/_filters/rstrip.md +++ b/_filters/rstrip.md @@ -3,7 +3,7 @@ title: rstrip description: Liquid filter that removes all whitespace from the right side of a string. --- -Removes all whitespace (tabs, spaces, and newlines) from the right side of a string. +Removes all whitespace (tabs, spaces, and newlines) from the right side of a string. It does not affect spaces between words.

Input

```liquid diff --git a/_filters/size.md b/_filters/size.md index 83f66672..96d8a096 100644 --- a/_filters/size.md +++ b/_filters/size.md @@ -33,7 +33,7 @@ Returns the number of characters in a string or the number of items in an array. {{ my_array.size }} ``` -You can use `size` with dot notation when you need to use the filter inside a tag. +You can use `size` with dot notation when you need to use the filter inside a tag: ```liquid {% raw %} diff --git a/_filters/slice.md b/_filters/slice.md index eefdc41c..eeb1bb8a 100644 --- a/_filters/slice.md +++ b/_filters/slice.md @@ -3,7 +3,7 @@ title: slice description: Liquid filter that returns a substring from a given position in a string. --- -Returns a substring of 1 character beginning at the index specified by the argument passed in. An optional second argument specifies the length of the substring to be returned. +Returns a substring of 1 character beginning at the index specified by the first argument. An optional second argument specifies the length of the substring to be returned. String indices are numbered starting from 0. @@ -43,7 +43,7 @@ String indices are numbered starting from 0. {{ "Liquid" | slice: 2, 5 }} ``` -If the first parameter is a negative number, the indices are counted from the end of the string: +If the first argument is a negative number, the indices are counted from the end of the string:

Input

```liquid diff --git a/_filters/sort.md b/_filters/sort.md index f6cbd8a8..f890d5ce 100644 --- a/_filters/sort.md +++ b/_filters/sort.md @@ -21,7 +21,7 @@ Sorts items in an array in case-sensitive order. {{ my_array | sort | join: ", " }} ``` -An optional parameter specifies which property of the array's items to use for sorting. +An optional argument specifies which property of the array's items to use for sorting. ```liquid {% raw %} diff --git a/_filters/sort_natural.md b/_filters/sort_natural.md index 71489b1d..316cb76a 100644 --- a/_filters/sort_natural.md +++ b/_filters/sort_natural.md @@ -21,7 +21,7 @@ Sorts items in an array in case-insensitive order. {{ my_array | sort_natural | join: ", " }} ``` -An optional parameter specifies which property of the array's items to use for sorting. +An optional argument specifies which property of the array's items to use for sorting. ```liquid {% raw %} diff --git a/_filters/split.md b/_filters/split.md index 17a72d14..40ebae69 100644 --- a/_filters/split.md +++ b/_filters/split.md @@ -3,7 +3,7 @@ title: split description: Liquid filter that splits a string into an array using separators. --- -Divides an input string into an array using the argument as a separator. `split` is commonly used to convert comma-separated items from a string to an array. +Divides a string into an array using the argument as a separator. `split` is commonly used to convert comma-separated items from a string to an array.

Input

```liquid diff --git a/_filters/strip.md b/_filters/strip.md index 6885ac4d..3efdad25 100644 --- a/_filters/strip.md +++ b/_filters/strip.md @@ -1,9 +1,9 @@ --- title: strip -description: Liquid filter that removes whitespace from the left and right sides of a string. +description: Liquid filter that removes all whitespace from the left and right sides of a string. --- -Removes all whitespace (tabs, spaces, and newlines) from both the left and right side of a string. It does not affect spaces between words. +Removes all whitespace (tabs, spaces, and newlines) from both the left and right sides of a string. It does not affect spaces between words.

Input

```liquid diff --git a/_filters/truncate.md b/_filters/truncate.md index df502f44..c0b0a4e3 100644 --- a/_filters/truncate.md +++ b/_filters/truncate.md @@ -3,7 +3,7 @@ title: truncate description: Liquid filter that truncates a string to a given number of characters. --- -`truncate` shortens a string down to the number of characters passed as a parameter. If the number of characters specified is less than the length of the string, an ellipsis (...) is appended to the string and is included in the character count. +Shortens a string down to the number of characters passed as an argument. If the specified number of characters is less than the length of the string, an ellipsis (...) is appended to the string and is included in the character count.

Input

```liquid @@ -19,9 +19,9 @@ description: Liquid filter that truncates a string to a given number of characte ### Custom ellipsis -`truncate` takes an optional second parameter that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence. +`truncate` takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence. -The length of the second parameter counts against the number of characters specified by the first parameter. For example, if you want to truncate a string to exactly 10 characters, and use a 3-character ellipsis, use **13** for the first parameter of `truncate`, since the ellipsis counts as 3 characters. +The length of the second argument counts against the number of characters specified by the first argument. For example, if you want to truncate a string to exactly 10 characters, and use a 3-character ellipsis, use **13** for the first argument of `truncate`, since the ellipsis counts as 3 characters.

Input

```liquid @@ -37,7 +37,7 @@ The length of the second parameter counts against the number of characters speci ### No ellipsis -You can truncate to the exact number of characters specified by the first parameter and show no trailing characters by passing a blank string as the second parameter: +You can truncate to the exact number of characters specified by the first argument and avoid showing trailing characters by passing a blank string as the second argument:

Input

```liquid diff --git a/_filters/truncatewords.md b/_filters/truncatewords.md index 85e02e33..6d5c5ab1 100644 --- a/_filters/truncatewords.md +++ b/_filters/truncatewords.md @@ -1,9 +1,9 @@ --- title: truncatewords -description: Liquid filter that truncates a string to the given number of words. +description: Liquid filter that truncates a string to a given number of words. --- -Shortens a string down to the number of words passed as the argument. If the specified number of words is less than the number of words in the string, an ellipsis (...) is appended to the string. +Shortens a string down to the number of words passed as an argument. If the specified number of words is less than the number of words in the string, an ellipsis (...) is appended to the string.

Input

```liquid @@ -19,7 +19,7 @@ Shortens a string down to the number of words passed as the argument. If the spe ### Custom ellipsis -`truncatewords` takes an optional second parameter that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence. +`truncatewords` takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence.

Input

```liquid @@ -35,7 +35,7 @@ Shortens a string down to the number of words passed as the argument. If the spe ### No ellipsis -You can avoid showing trailing characters by passing a blank string as the second parameter: +You can avoid showing trailing characters by passing a blank string as the second argument:

Input

```liquid diff --git a/_filters/upcase.md b/_filters/upcase.md index 1c6112ca..62785372 100644 --- a/_filters/upcase.md +++ b/_filters/upcase.md @@ -1,6 +1,6 @@ --- title: upcase -description: Liquid filter that capitalizes every character in a string. +description: Liquid filter that converts a string to uppercase. --- Makes each character in a string uppercase. It has no effect on strings which are already all uppercase. diff --git a/_tags/comment.md b/_tags/comment.md index d9d43fc5..3125ffd5 100644 --- a/_tags/comment.md +++ b/_tags/comment.md @@ -4,7 +4,7 @@ description: An overview of comments tags in the Liquid template language. --- Allows you to leave un-rendered code inside a Liquid template. Any text within -the opening and closing `comment` blocks will not be output, and any Liquid code +the opening and closing `comment` blocks will not be printed, and any Liquid code within will not be executed.

Input

diff --git a/_tags/iteration.md b/_tags/iteration.md index 1f47092a..72ee37c6 100644 --- a/_tags/iteration.md +++ b/_tags/iteration.md @@ -153,7 +153,7 @@ Defines a range of numbers to loop through. The range can be defined by both lit ### reversed -Reverses the order of the loop. Note that the flag’s spelling is different to the filter `reverse`. +Reverses the order of the loop. Note that this flag's spelling is different from the filter `reverse`.

Input

```liquid @@ -172,7 +172,7 @@ Reverses the order of the loop. Note that the flag’s spelling is different to ## cycle -Loops through a group of strings and outputs them in the order that they were passed as parameters. Each time `cycle` is called, the next string that was passed as a parameter is output. +Loops through a group of strings and prints them in the order that they were passed as arguments. Each time `cycle` is called, the next string argument is printed. `cycle` must be used within a [for](#for) loop block. @@ -201,7 +201,7 @@ Uses for `cycle` include: ## cycle (parameters) -`cycle` accepts a parameter called `cycle group` in cases where you need multiple `cycle` blocks in one template. If no name is supplied for the cycle group, then it is assumed that multiple calls with the same parameters are one group. +`cycle` accepts a "cycle group" parameter in cases where you need multiple `cycle` blocks in one template. If no name is supplied for the cycle group, then it is assumed that multiple calls with the same parameters are one group.

Input

```liquid diff --git a/_tags/variable.md b/_tags/variable.md index d99c3140..612778a1 100644 --- a/_tags/variable.md +++ b/_tags/variable.md @@ -24,7 +24,7 @@ Creates a new variable. This statement is valid. ``` -Wrap a variable in quotations `"` to save it as a string. +Wrap a variable value in quotations `"` to save it as a string.

Input

```liquid @@ -41,7 +41,7 @@ bar ## capture -Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through `{% raw %}{% capture %}{% endraw %}` are strings. +Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through `capture` are strings.

Input

```liquid @@ -56,7 +56,7 @@ Captures the string inside of the opening and closing tags and assigns it to a v I am being captured. ``` -Using `capture`, you can create complex strings using other variables created with `assign`. +Using `capture`, you can create complex strings using other variables created with `assign`:

Input

```liquid