[closebracket addon] Deal more gracefully with triple quotes

Issue #2385