diff --git a/src/core/Util.ml b/src/core/Util.ml index 23a4a795e..c27568e27 100644 --- a/src/core/Util.ml +++ b/src/core/Util.ml @@ -281,7 +281,12 @@ let pp_list0 ?(sep=" ") pp_x out = function let tstp_needs_escaping s = assert (s<>""); s.[0] = '_' || - CCString.exists (function ' ' | '#' | '$' | '+' | '-' | '/' -> true | _ -> false) s + CCString.exists + (function + | ' ' | '#' | '$' | '+' | '-' | '/' | '\n' + | '\t' | '\r' | '<' | '>' -> true + | _ -> false) + s let pp_str_tstp out s = CCFormat.string out (if tstp_needs_escaping s then "'" ^ String.escaped s ^ "'" else s)