diff options
author | Lukas Larsson <lukas@erlang.org> | 2020-03-12 17:30:45 +0100 |
---|---|---|
committer | Lukas Larsson <lukas@erlang.org> | 2020-03-20 11:46:39 +0100 |
commit | 42a9cf011276291812b3f6a2715c250216475852 (patch) | |
tree | 7bf11a9b028dcaf67513b255c6e7109b9b177da7 /lib/erl_docgen | |
parent | 9a3af148e18dd6abf27a355fb336fb819e253845 (diff) | |
download | erlang-42a9cf011276291812b3f6a2715c250216475852.tar.gz |
docgen: Introduce and use 'div' instead of 'p'
We do this as it is not allowed to nest multiple levels of 'p'
so instead we use 'div' for the same purpose.
Diffstat (limited to 'lib/erl_docgen')
-rw-r--r-- | lib/erl_docgen/src/docgen_xml_to_chunk.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/erl_docgen/src/docgen_xml_to_chunk.erl b/lib/erl_docgen/src/docgen_xml_to_chunk.erl index 810281c383..5408a36ac9 100644 --- a/lib/erl_docgen/src/docgen_xml_to_chunk.erl +++ b/lib/erl_docgen/src/docgen_xml_to_chunk.erl @@ -181,7 +181,7 @@ build_dom({endElement, _Uri, LocalName, _QName}, title -> lists:nth(SectionDepth+1,[h1,h2,h3]); section when SectionDepth > 0 -> - p; + 'div'; CName -> CName end, @@ -361,7 +361,7 @@ transform([{url,Attrs,Content}|T],Acc) -> %% transform note/warning/do/don't to <p class="thing"> transform([{What,[],Content}|T],Acc) when What =:= note; What =:= warning; What =:= do; What =:= dont -> - WhatP = {p,[{class,atom_to_binary(What)}], transform(Content,[])}, + WhatP = {'div',[{class,atom_to_binary(What)}], transform(Content,[])}, transform(T,[WhatP|Acc]); transform([{type,_,[]}|_] = Dom,Acc) -> @@ -414,6 +414,8 @@ transform([{input,_,Content}|T],Acc) -> transform([{p,Attr,Content}|T],Acc) -> transform(T,[{p,a2b(Attr),transform(Content,[])}|Acc]); +transform([{'div',Attr,Content}|T],Acc) -> + transform(T,[{'div',a2b(Attr),transform(Content,[])}|Acc]); %% Tag and Attr is used as is but Content is transformed transform([{Tag,Attr,Content}|T],Acc) -> |