LeandroAntunes39 opened a new pull request, #751:
URL: https://github.com/apache/commons-text/pull/751
Fixes TEXT-178.
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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]