Skip to content

Commit f4b7a5f

Browse files
committed
chore: rename an internal func to make it more readable
1 parent b853884 commit f4b7a5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hocon_pp.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,16 @@ is_quote_key(K) ->
176176
true
177177
end.
178178

179+
%% Return 'true' if a string is to be quoted when formatted as HOCON.
179180
%% A sequence of characters outside of a quoted string is a string value if:
180181
%% it does not contain "forbidden characters":
181182
%% '$', '"', '{', '}', '[', ']', ':', '=', ',', '+', '#', '`', '^', '?', '!', '@', '*',
182183
%% '&', '' (backslash), or whitespace.
183184
%% '$"{}[]:=,+#`^?!@*& \\'
184-
185-
is_quote_str(S) ->
185+
is_to_quote_str(S) ->
186186
case hocon_scanner:string(S) of
187187
{ok, [{Tag, 1, S}], 1} when Tag =:= string orelse Tag =:= unqstr ->
188-
%% contain $"{}[]:=,+#`^?!@*& \\ should be quote
188+
%% contain $"{}[]:=,+#`^?!@*& \\ should be quoted
189189
case re:run(S, "^[^$\"{}\\[\\]:=,+#`\\^?!@*&\\ \\\\]*$") of
190190
nomatch -> true;
191191
_ -> false
@@ -195,7 +195,7 @@ is_quote_str(S) ->
195195
end.
196196

197197
maybe_quote_latin1_str(S) ->
198-
case is_quote_str(S) of
198+
case is_to_quote_str(S) of
199199
true -> bin(io_lib:format("~0p", [S]));
200200
false -> S
201201
end.

0 commit comments

Comments
 (0)