Allow the slow query grammer to accept a new line or the end of string.