File otp_src_26.2.3-lib-edoc-edoc_html_to_markdown-doc.patch of Package erlang
diff -Ndurp otp_src_26.2.3/lib/edoc/src/edoc_html_to_markdown.erl otp_src_26.2.3-lib-edoc-edoc_html_to_markdown-doc/lib/edoc/src/edoc_html_to_markdown.erl
--- otp_src_26.2.3/lib/edoc/src/edoc_html_to_markdown.erl 2024-03-08 20:38:23.012011060 +0200
+++ otp_src_26.2.3-lib-edoc-edoc_html_to_markdown-doc/lib/edoc/src/edoc_html_to_markdown.erl 2024-03-08 20:40:01.069941789 +0200
@@ -23,28 +23,10 @@
-module(edoc_html_to_markdown).
-feature(maybe_expr, enable).
--if(?OTP_RELEASE < 27).
--define(NO_DOCS, true).
--endif.
-
--ifndef(NO_DOCS).
--moduledoc """
-This module can convert application/html+erlang style documentation to markdown.
-""".
--endif.
-
-include_lib("kernel/include/eep48.hrl").
-export([convert_html/2, convert_xml/2, convert_html/3, convert_xml/3]).
--ifndef(NO_DOCS).
--doc """
-Convert [`application/html+erlang`](`t:shell_docs:chunk_element/0`) to Markdown
-suitable for usage with ExDoc.
-
-The `Application` and `Module` argument are used to correctly generate links.
-""".
--endif.
-spec convert_html(Application :: atom(),
Module :: module(),
Html :: shell_docs:chunk_elements()) ->
@@ -55,22 +37,13 @@ convert_html(Application, Module, Html)
render_docs(shell_docs:normalize(Html)).
%% Internal functions
--ifndef(NO_DOCS).
--doc false.
--endif.
convert_html(Application, Html) when is_atom(Application) ->
put(module, ''),
put(application, atom_to_binary(Application)),
render_docs(shell_docs:normalize(Html)).
--ifndef(NO_DOCS).
--doc false.
--endif.
convert_xml(Application, Binary) when is_atom(Application) ->
convert_xml(Application, '', Binary).
--ifndef(NO_DOCS).
--doc false.
--endif.
convert_xml(Application, Module, Binary) when is_atom(Application), is_atom(Module) ->
put(application, atom_to_binary(Application)),
case xmerl_sax_parser:stream(iolist_to_binary(["<section>",Binary,"</section>"]),