|
30 | 30 | import com.hubspot.jinjava.el.ExpressionResolver; |
31 | 31 | import com.hubspot.jinjava.el.ext.DeferredParsingException; |
32 | 32 | import com.hubspot.jinjava.el.ext.ExtendedParser; |
| 33 | +import com.hubspot.jinjava.features.BuiltInFeatures; |
33 | 34 | import com.hubspot.jinjava.interpret.AutoCloseableSupplier.AutoCloseableImpl; |
34 | 35 | import com.hubspot.jinjava.interpret.Context.TemporaryValueClosable; |
35 | 36 | import com.hubspot.jinjava.interpret.ContextConfigurationIF.ErrorHandlingStrategyIF; |
@@ -87,9 +88,9 @@ public class JinjavaInterpreter implements PyishSerializable { |
87 | 88 | "ignored_output_from_extends"; |
88 | 89 |
|
89 | 90 | public static final String OUTPUT_UNDEFINED_VARIABLES_ERROR = |
90 | | - "OUTPUT_UNDEFINED_VARIABLES_ERROR"; |
| 91 | + BuiltInFeatures.OUTPUT_UNDEFINED_VARIABLES_ERROR; |
91 | 92 | public static final String IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS = |
92 | | - "IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS"; |
| 93 | + BuiltInFeatures.IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS; |
93 | 94 | private final Multimap<String, BlockInfo> blocks = ArrayListMultimap.create(); |
94 | 95 | private final LinkedList<Node> extendParentRoots = new LinkedList<>(); |
95 | 96 | private final Map<String, RevertibleObject> revertibleObjects = new HashMap<>(); |
@@ -288,9 +289,7 @@ public String renderFlat(String template, long renderLimit) { |
288 | 289 | private TemporaryValueClosable<ErrorHandlingStrategy> ignoreParseErrorsIfActivated() { |
289 | 290 | return config |
290 | 291 | .getFeatures() |
291 | | - .getActivationStrategy( |
292 | | - JinjavaInterpreter.IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS |
293 | | - ) |
| 292 | + .getActivationStrategy(BuiltInFeatures.IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS) |
294 | 293 | .isActive(context) |
295 | 294 | ? context.withErrorHandlingStrategy(ErrorHandlingStrategyIF.ignoreAll()) |
296 | 295 | : TemporaryValueClosable.noOp(); |
@@ -664,7 +663,7 @@ public Object retraceVariable(String variable, int lineNumber, int startPosition |
664 | 663 | if ( |
665 | 664 | getConfig() |
666 | 665 | .getFeatures() |
667 | | - .getActivationStrategy(OUTPUT_UNDEFINED_VARIABLES_ERROR) |
| 666 | + .getActivationStrategy(BuiltInFeatures.OUTPUT_UNDEFINED_VARIABLES_ERROR) |
668 | 667 | .isActive(context) |
669 | 668 | ) { |
670 | 669 | addError( |
|
0 commit comments