Skip to content

Commit 5a2139e

Browse files
jasmith-hsclaude
andcommitted
feat: add boolean parameter to withUnwrapRawOverride
Callers sometimes need to temporarily set the unwrap raw override to false (not just true). Adding a parameter avoids forcing callers to work around the API by manually managing set/restore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 90af49e commit 5a2139e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/hubspot/jinjava/interpret/Context.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,11 +884,15 @@ public void setUnwrapRawOverride(boolean unwrapRawOverride) {
884884
}
885885

886886
public TemporaryValueClosable<Boolean> withUnwrapRawOverride() {
887+
return withUnwrapRawOverride(true);
888+
}
889+
890+
public TemporaryValueClosable<Boolean> withUnwrapRawOverride(boolean value) {
887891
TemporaryValueClosable<Boolean> temporaryValueClosable = new TemporaryValueClosable<>(
888892
isUnwrapRawOverride(),
889893
this::setUnwrapRawOverride
890894
);
891-
setUnwrapRawOverride(true);
895+
setUnwrapRawOverride(value);
892896
return temporaryValueClosable;
893897
}
894898

0 commit comments

Comments
 (0)