Skip to content

Commit 2c7e638

Browse files
committed
fix: escape binary syntax in EDoc comment to fix XML parsing error
The EDoc parser was failing because unescaped << and >> in the parse_content_type/1 doc comment were interpreted as XML tags. Wrapped the example in inline code syntax.
1 parent b25b509 commit 2c7e638

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hackney_headers.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ to_binary(Headers) ->
227227

228228
%% @doc Parse Content-Type header into {Type, SubType, Params}.
229229
%% The charset parameter is lowercased as it's case insensitive.
230-
%% Example: <<"text/html; charset=UTF-8">> -> {<<"text">>, <<"html">>, [{<<"charset">>, <<"utf-8">>}]}
230+
%% Example: `<<"text/html; charset=UTF-8">> -> {<<"text">>, <<"html">>, [{<<"charset">>, <<"utf-8">>}]}'
231231
-spec parse_content_type(binary()) -> {binary(), binary(), [{binary(), binary()}]} | {error, badarg}.
232232
parse_content_type(Data) ->
233233
parse_media_type(Data,

0 commit comments

Comments
 (0)