We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case: https://liquidjs.com/playground.html#e3sgIm9uZSB0d28gdGhyZWUiIHwgdHJ1bmNhdGV3b3JkczowIH19,e30=
{{ "one two three" | truncatewords:0 }} should return "one..."
{{ "one two three" | truncatewords:0 }}
"one..."
Source: https://github.com/Shopify/liquid/blob/81f44e36be5f2110c26b6532fd4ccd22edaf59f2/lib/liquid/standardfilters.rb#L237
https://github.com/Shopify/liquid/blob/ff1c35b986451cca14d9da9b2ef772cbc9c65b24/test/integration/standard_filter_test.rb#L229
The text was updated successfully, but these errors were encountered:
I also believe that " one two three" should strip the first spaces in the results. You are adding a single space right now.
" one two three"
Sorry, something went wrong.
fix: truncatewords should use at least one word, #537
32f613f
chore(release): 9.42.1 [skip ci]
bf6b5c7
## [9.42.1](v9.42.0...v9.42.1) (2022-10-21) ### Bug Fixes * truncatewords should use at least one word, [#537](#537) ([32f613f](32f613f))
No branches or pull requests
Test case:
https://liquidjs.com/playground.html#e3sgIm9uZSB0d28gdGhyZWUiIHwgdHJ1bmNhdGV3b3JkczowIH19,e30=
{{ "one two three" | truncatewords:0 }}
should return"one..."
Source:
https://github.com/Shopify/liquid/blob/81f44e36be5f2110c26b6532fd4ccd22edaf59f2/lib/liquid/standardfilters.rb#L237
https://github.com/Shopify/liquid/blob/ff1c35b986451cca14d9da9b2ef772cbc9c65b24/test/integration/standard_filter_test.rb#L229
The text was updated successfully, but these errors were encountered: