Back to single description div and manual break line spacing

This commit is contained in:
Willem Cazander 2025-01-19 18:24:00 +01:00
parent 34838eaf04
commit d77f9dfc57

View file

@ -215,7 +215,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
ApiDocContentWriter writer = event.getWriter();
List<ApiDocNodeWriter> bodyWriterDescriptionLinks = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_LINKS);
List<ApiDocNodeWriter> bodyWriterDescriptionNode = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_NODE);
//writer.printTagStart(Tag.div, ApiDocContentCss.description);
writer.printTagStart(Tag.div, ApiDocContentCss.description);
writer.docPageBlockStart();
if (isPageMode==false) {
if (bodyWriterDescriptionLinks.isEmpty()) {
@ -223,9 +223,8 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
}
for (int i=0;i<bodyWriterDescriptionLinks.size();i++) {
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionLinks.get(i);
writer.printTagStart(Tag.div, ApiDocContentCss.description);
nodeWriter.writeNodeContent(event);
writer.printTagEnd(Tag.div);
writer.printTagStartEnd(Tag.br);
if (i+1<bodyWriterDescriptionLinks.size()) {
writer.printTagStartEnd(Tag.br);
}
@ -234,21 +233,18 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
writer.printTagStartEnd(Tag.br);
}
if (bodyWriterDescriptionNode.isEmpty()) {
writer.printTagStart(Tag.div, ApiDocContentCss.description);
defaultWriteNodeDescription(event);
writer.printTagEnd(Tag.div);
}
for (int i=0;i<bodyWriterDescriptionNode.size();i++) {
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionNode.get(i);
writer.printTagStart(Tag.div, ApiDocContentCss.description);
nodeWriter.writeNodeContent(event);
writer.printTagEnd(Tag.div);
writer.printTagStartEnd(Tag.br);
if (i+1<bodyWriterDescriptionNode.size()) {
writer.printTagStartEnd(Tag.br);
}
}
writer.docPageBlockEnd();
//writer.printTagEnd(Tag.div); // description
writer.printTagEnd(Tag.div); // description
}
private void writeNodeSummary(ApiDocWriteEvent<ApiDocNode> event,boolean isPageMode) throws IOException {