On Thu, 22 Feb 2024 19:17:09 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

>>>I think in this place we also need to check for indented code blocks, since 
>>>we reduced currIndent and may have 4 or more character indentation compared 
>>>to the new currIndent value.
>> 
>> This seems wrong. Surely, we should not reduce the indentation and then for 
>> the same line in the comment check for an extra-indented line. Or else I am 
>> missing something.
>> 
>> That being said, thanks for the test case. I will investigate it.
>
> Update: I see and understand your test case.

Update: I found that more elegant solution you hinted at, by refactoring the 
method from nested `if` statements to a series of checks with early returns.

The test case you provided now works as expected.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1499918026

Reply via email to