Skip to content

Commit e9ff926

Browse files
committed
fix: check if string is unquoted whne pretty-print
1 parent 6f8269f commit e9ff926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/hocon_pp.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ is_quote_key(K) ->
184184

185185
is_quote_str(S) ->
186186
case hocon_scanner:string(S) of
187-
{ok, [{string, 1, S}], 1} ->
187+
{ok, [{Tag, 1, S}], 1} when Tag =:= string orelse Tag =:= unqstr ->
188188
%% contain $"{}[]:=,+#`^?!@*& \\ should be quote
189189
case re:run(S, "^[^$\"{}\\[\\]:=,+#`\\^?!@*&\\ \\\\]*$") of
190190
nomatch -> true;

0 commit comments

Comments
 (0)