Skip to content

[TEXT-179] Fix escaped nested variable pattern handling#751

Closed
LeandroAntunes39 wants to merge 1 commit into
apache:masterfrom
LeandroAntunes39:TEXT-179-string-substitutor-escape
Closed

[TEXT-179] Fix escaped nested variable pattern handling#751
LeandroAntunes39 wants to merge 1 commit into
apache:masterfrom
LeandroAntunes39:TEXT-179-string-substitutor-escape

Conversation

@LeandroAntunes39

@LeandroAntunes39 LeandroAntunes39 commented Jun 10, 2026

Copy link
Copy Markdown

Fixes TEXT-179.

This change fixes the handling of escaped variable expressions that start with a nested variable prefix but do not contain a matching outer suffix.

Before this change, $${${a} was processed in a way that allowed the inner ${a} expression to be resolved after the escape character was removed, producing ${1.

The expected behavior is to keep the expression as ${${a}, because the escaped outer expression should be treated as a whole and the inner prefix should not be processed independently in this incomplete boundary pattern.

The change preserves the existing behavior for complete escaped nested expressions such as $${${a}}, which still resolves to ${1}, and for standard escaped expressions such as $${animal}, which still resolves to ${animal}.

Added/enabled regression coverage in StringSubstitutorTest.

@LeandroAntunes39 LeandroAntunes39 changed the title TEXT-178 Fix escaped nested variable pattern handling TEXT-179 Fix escaped nested variable pattern handling Jun 10, 2026
@garydgregory garydgregory changed the title TEXT-179 Fix escaped nested variable pattern handling [TEXT-179] Fix escaped nested variable pattern handling Jun 10, 2026
@garydgregory

Copy link
Copy Markdown
Member

Jira ticket is https://issues.apache.org/jira/browse/TEXT-179

@garydgregory

Copy link
Copy Markdown
Member

@LeandroAntunes39
The build is broken, closing in favor of #752, you'll be credited in changes.xml.

@LeandroAntunes39 LeandroAntunes39 deleted the TEXT-179-string-substitutor-escape branch June 11, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants