-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of space-deletion before
#set
.
Previously we deleted horizontal whitespace between a `$reference` and a following `#set`, and all whitespace between a `#directive` and a following `#set`. But this was wrong (meaning, not the way Apache Velocity does it). We should only ever delete horizontal whitespace before a `#set`, whether preceded by a `$reference` or a `#directive`. The confusion arose because a single newline is deleted _after_ a `#directive`, and then what remains before the `#set` may indeed only be horizontal whitespace. Also fix a bug in `TemplateTest` where the same `VelocityEngine` instance was being used for multiple `compare` calls in the same test method. That was not right, because macros defined in one call persisted until the next and were not overridden by definitions of the same name. RELNOTES=A bug with space deletion before `#set` has been fixed, to be more like Apache Velocity. PiperOrigin-RevId: 502855503
- Loading branch information
1 parent
014eb69
commit 7ab4397
Showing
4 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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