Release Notes
- Fixed
str.countinpycompatlooping forever when counting an empty string. Like in Python,'abc'.count('')is now4. - Fixed
str.islowerandstr.isupperinpycompatreturning false for strings with spaces, digits or other uncased characters, and thestr.is*predicates returning true for an empty string. They now follow Python, so'foo bar'.islower()is true and''.isdigit()is false. - Fixed
str.findandstr.rfindinpycompatreturning byte offsets. Like in Python they now return character offsets, so'über'.find('e')is2. - Fixed integer addition, subtraction and multiplication in Go losing precision above 2**53 and clamping results that overflow 64 bits, because they were computed with floats. They are now exact, and like in Rust a result that doesn't fit 64 bits becomes a big integer, so
9007199254740993 + 0is9007199254740993and9223372036854775807 + 1is9223372036854775808. #981 - Fixed booleans not being usable as integers in
-,*,/,//and%and for repeating strings and sequences in Go. Like in Rust and Jinja2,true - 1is0and"ab" * trueisab. - Fixed
**failing with a negative integer exponent in Rust. Like in Jinja2,2 ** -1is now0.5. Zero to a negative power now always fails in Rust and Go like a division by zero, instead of producinginffor floats in Rust and for all numbers in Go. #982 - Fixed
**on integers in Go being computed with floats. Like in Rust the result is now exact up to 128 bits and fails beyond that, a float base stays a float so2.0 ** 3is8.0, and booleans count as integers. - Fixed the
sortfilter ignoring a comma-separated list of attributes in Go. Like in Rust,sort(attribute="name, state")now sorts bynameand then bystateinstead of leaving the items in their original order. #979 - Fixed the
sortfilter comparing strings case-sensitively when sorting by several attributes in Rust and Go. Like in Jinja2, each part of the key is now compared case-insensitively unlesscase_sensitiveis set. An attribute list with whitespace-only entries such as"name, "also no longer sorts by an empty attribute in Rust. - Added the
attributeandstartarguments to thesumfilter and theattributeargument to thejoinfilter for Jinja2 compatibility in Rust and Go. Like in Jinja2 the arguments can be passed positionally or by keyword, and the separator ofjoincan also be passed asd. In Go the first positional argument ofsumis now the attribute rather than the start value, sosum(100)needs to be written assum(start=100). Go previously ignored unknown keyword arguments tosumandjoinand now fails like Rust. Like in Jinja2,sumin Rust can now also concatenate lists when given a list asstart. #980 - Fixed the handling of none arguments to the
int,floatandroundfilters in Go. Like in Rust they now count as not given, so2.5|round(none)is2.0instead of an error. - Fixed the
joinfilter dropping a separator that is not a string in Go. Like in Rust it is converted to a string, so[1, 2]|join(3)is132.
Install minijinja-cli 3.0.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/3.0.4/minijinja-cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/3.0.4/minijinja-cli-installer.ps1 | iex"Download minijinja-cli 3.0.4
| File | Platform | Checksum |
|---|---|---|
| minijinja-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| minijinja-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| minijinja-cli-aarch64-pc-windows-msvc.zip | ARM64 Windows | checksum |
| minijinja-cli-i686-pc-windows-msvc.zip | x86 Windows | checksum |
| minijinja-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| minijinja-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| minijinja-cli-i686-unknown-linux-gnu.tar.xz | x86 Linux | checksum |
| minijinja-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
| minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz | ARMv7 Linux | checksum |
| minijinja-cli-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| minijinja-cli-i686-unknown-linux-musl.tar.xz | x86 MUSL Linux | checksum |
| minijinja-cli-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |