aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-08-28 13:31:17 +0200
committerBjörn Gustavsson <[email protected]>2019-04-04 12:30:20 +0200
commite05c018328cbb0b473817e5d689ba8118442757b (patch)
tree49d329c1b6f6b2b9f2b005d220abc5996a1b2640 /lib/erl_docgen/src
parentfa9e189d90a35f2ce4b7fc145c994828f34b3548 (diff)
downloadotp-e05c018328cbb0b473817e5d689ba8118442757b.tar.gz
otp-e05c018328cbb0b473817e5d689ba8118442757b.tar.bz2
otp-e05c018328cbb0b473817e5d689ba8118442757b.zip
compiler: Add internal docs section
Diffstat (limited to 'lib/erl_docgen/src')
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index d562cfddcc..2c9aa2e3a3 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1260,11 +1260,15 @@ get_text(#xmlElement{content=[E]}) ->
%% text_and_name_only(Es) -> {N, Ts}
text_and_a_name_only(Es) ->
- [Name|_] = [Name ||
- #xmlElement{
- name = a,
- attributes = [#xmlAttribute{name=name}]}=Name <- Es],
- {Name#xmlElement{content = []}, text_only(Es)}.
+ erlang:display(Es),
+ case [Name || #xmlElement{
+ name = a,
+ attributes = [#xmlAttribute{name=name}]}=Name <- Es] of
+ [Name|_] ->
+ {Name#xmlElement{content = []}, text_only(Es)};
+ [] ->
+ {"", text_only(Es)}
+ end.
%% text_only(Es) -> Ts
%% Takes a list of xmlElement and xmlText and return a lists of xmlText.