File 2454-fixup-erl_docgen-Add-since-attribute-to-XML-taglist-.patch of Package erlang
From 80d08901c70dabaea7856a72c88bfc2ac894de64 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Tue, 7 Mar 2023 10:38:53 +0100
Subject: [PATCH 4/4] fixup! erl_docgen: Add "since" attribute to XML
taglist/tag
---
lib/stdlib/src/shell_docs.erl | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/stdlib/src/shell_docs.erl b/lib/stdlib/src/shell_docs.erl
index d9959c473e..603946ec98 100644
--- a/lib/stdlib/src/shell_docs.erl
+++ b/lib/stdlib/src/shell_docs.erl
@@ -872,16 +872,16 @@ render_element({li,[],Content},[l | _] = State, Pos, Ind,D) ->
render_element({dl,_,Content},State,Pos,Ind,D) ->
render_docs(Content, [dl|State], Pos, Ind,D);
-render_element({dt,Since,Content},[dl | _] = State,Pos,Ind,D) ->
- Suffix = case Since of
- [{since, Vsn}] ->
- ": (since " ++ unicode:characters_to_list(Vsn) ++ ")\n";
- _ ->
- ":\n"
+render_element({dt,Attr,Content},[dl | _] = State,Pos,Ind,D) ->
+ Since = case Attr of
+ [{since, Vsn}] ->
+ [" (since ",unicode:characters_to_list(Vsn),$)];
+ [] ->
+ []
end,
Underline = sansi(underline),
{Docs, _NewPos} = render_docs(Content, [li | State], Pos, Ind, D),
- {[Underline,Docs,ransi(underline),Suffix], 0};
+ {[Underline,Docs,ransi(underline),$:,Since,$\n], 0};
render_element({dd,_,Content},[dl | _] = State,Pos,Ind,D) ->
trimnlnl(render_docs(Content, [li | State], Pos, Ind + 2, D));
--
2.35.3