Do not treat promiser as regex in insert_lines promises

Close #5270