diff options
author | Claude Brisson <cbrisson@apache.org> | 2016-08-30 16:18:33 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2016-08-30 16:18:33 +0000 |
commit | aad9847231c3a1ba2a5c9b57301190575ba7e1a5 (patch) | |
tree | 1e1373210f46ba6837880af6a2e858dc51b9f764 /velocity-engine-core/src/main/resources/org/apache/velocity | |
parent | b4738f7e7a90b7c7261639bfb552590dd478ebc6 (diff) | |
download | apache-velocity-engine-aad9847231c3a1ba2a5c9b57301190575ba7e1a5.tar.gz |
[engine] Add a configurable space gobbling feature, to control indentation in the generated code.
Possible values for the 'space.gobbling' configuration key:
- none : no space gobbling at all
- bc : Velocity 1.x backward compatible space gobbling
- lines (the default) : gobbles whitespaces and endline from lines containing a single VTL directive
- structured (beta stage) : like 'lines', but also fixes indentation in embedded text blocks
The commit also includes some lookahead optimizations and cleaning in the javacc parser code.
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1758416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src/main/resources/org/apache/velocity')
-rw-r--r-- | velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties index 956b605f..a1964a7b 100644 --- a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties +++ b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties @@ -223,4 +223,10 @@ introspector.restrict.classes = java.lang.Thread introspector.restrict.classes = java.lang.ThreadGroup introspector.restrict.classes = java.lang.ThreadLocal +# ---------------------------------------------------------------------------- +# SPACE GOBBLING +# ---------------------------------------------------------------------------- +# Possible values: none, bc (aka Backward Compatible), lines, structured +# ---------------------------------------------------------------------------- +space.gobbling = lines |