Skip to content

Commit 3874722

Browse files
committed
Add option for LegacyOverrides.ALL
1 parent 35b2551 commit 3874722

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/main/java/com/hubspot/jinjava/LegacyOverrides.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
/**
44
* This class allows Jinjava to be configured to override legacy behaviour.
55
* LegacyOverrides.NONE signifies that none of the legacy functionality will be overridden.
6+
* LegacyOverrides.ALL signifies that all new functionality will be used; avoid legacy "bugs".
67
*/
78
public class LegacyOverrides {
89
public static final LegacyOverrides NONE = new LegacyOverrides.Builder().build();
10+
public static final LegacyOverrides ALL = new LegacyOverrides.Builder()
11+
.withEvaluateMapKeys(true)
12+
.withIterateOverMapKeys(true)
13+
.withUsePyishObjectMapper(true)
14+
.withUseSnakeCasePropertyNaming(true)
15+
.withWhitespaceRequiredWithinTokens(true)
16+
.withUseNaturalOperatorPrecedence(true)
17+
.withParseWhitespaceControlStrictly(true)
18+
.withAllowAdjacentTextNodes(true)
19+
.build();
920
private final boolean evaluateMapKeys;
1021
private final boolean iterateOverMapKeys;
1122
private final boolean usePyishObjectMapper;

0 commit comments

Comments
 (0)