End multiline input at zero matching brackets.