Ends the current code block. Calls the parent renderer's code_block_ended signal and finalizes the widget.