[
https://issues.apache.org/jira/browse/TEXT-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18087789#comment-18087789
]
Leandro Antunes commented on TEXT-179:
--------------------------------------
I have submitted a pull request with a proposed fix:
https://github.com/apache/commons-text/pull/751
The change addresses the escaped nested boundary case where `$${${a}` was
incorrectly allowing the inner `${a}` expression to be resolved after removing
the escape character. The regression test now expects `${${a}` while preserving
existing behavior for `$${${a}}` and `$${animal}`.
> StringSubstitutor incorrectly removes the escape character in "$${${a}"
> -----------------------------------------------------------------------
>
> Key: TEXT-179
> URL: https://issues.apache.org/jira/browse/TEXT-179
> Project: Commons Text
> Issue Type: Bug
> Affects Versions: 1.9
> Reporter: Gary D. Gregory
> Priority: Major
>
> This is one case that was not solved by [TEXT-178].
> {code:java}
> /**
> * Tests interpolation with weird boundary patterns.
> */
> @Test
> @Disabled
> public void testReplace_JiraText178_WeirdPattenrs3() throws IOException {
> doReplace("${${a}", "$${${a}", false); // not "$${1" or "${1"
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)