From 0a6d15b8da355f8e14671b4019f44e46f0b594db Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 31 May 2017 10:05:29 +0200 Subject: observer: Allow edit of pid, port and refs Use lib:extended_parse_term/1 to allow editing terms which contains pids, ports and terms. ERL-178 --- lib/observer/src/observer_lib.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/observer/src') diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl index 7352af936c..c7ee294719 100644 --- a/lib/observer/src/observer_lib.erl +++ b/lib/observer/src/observer_lib.erl @@ -636,12 +636,12 @@ user_term_multiline(Parent, Title, Default) -> parse_string(Str) -> try - Tokens = case erl_scan:string(Str) of + Tokens = case erl_scan:string(Str, 1, [text]) of {ok, Ts, _} -> Ts; {error, {_SLine, SMod, SError}, _} -> throw(io_lib:format("~s", [SMod:format_error(SError)])) end, - case erl_parse:parse_term(Tokens) of + case lib:extended_parse_term(Tokens) of {error, {_PLine, PMod, PError}} -> throw(io_lib:format("~s", [PMod:format_error(PError)])); Res -> Res -- cgit v1.2.3