Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #672.
{{ [1, 2, 3]|max }}currently renders nothing because the filter is not registered. Add a built-inmax(case_sensitive=False, attribute=None)filter so this example renders3.Select the original maximum element in one pass without sorting or modifying the input; equal keys retain the first element. Support positional/named arguments, dotted attributes and list indices through the existing property resolver. Reuse Jinjava's
gtcoercion rules, map-iteration configuration, and case-insensitive string comparison. String iteration follows existing UTF-16 conventions. Empty/null inputs return null; invalid comparison values produce filter errors. Deferred inputs and comparison keys propagate deferral, while resolved attributes of partially deferred objects remain usable. Existing resolver restrictions, filter overrides, and disabling still apply. No dependency/configuration changes or changes to other filters.Validation
verifypasses with Temurin 17, 21, and 25, using Maven on Java 25: 2,265 tests per run, zero failures/errors, 23 skipped. The final Java 21/25 runs useclean verifyin separate checkouts of the same commit.en_USfor the pre-existing locale-sensitive number-format assertions. Spotless, Checkstyle, SpotBugs, PMD, diff review, andgit diff --checkpass.Existing limitation
Raw
DeferredValuemarkers nested inside Java collections can be serialized incorrectly by the existing eager reconstruction machinery. This was reproduced on untouched upstream with{{ (values|first).score }}; it is not addressed by this filter. Defer the collection itself or construct its deferred values through template expressions. Those two-pass paths are covered here.Implemented and reviewed with assistance from OpenAI Codex.