Skip to content

TEXT-179 Fix escaped nested variable pattern handling#751

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

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
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.

1 participant