Implement multiline block handling in console example.