The code folding function eats the end of the code block being collapsed.
I propose to do something like this
The folded up block of code looks like this: