Skip to content

Commit d0be467

Browse files
committed
issue doxygen#11828 Inconsistent vertical spacing of ordered list items in generated HTML
1 parent 46fb197 commit d0be467

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/htmldocvisitor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ void HtmlDocVisitor::operator()(const DocPara &p)
12621262
bool isLast = false;
12631263
contexts_t t = getParagraphContext(p,isFirst,isLast);
12641264
//printf("startPara first=%d last=%d\n",isFirst,isLast);
1265-
if (!std::holds_alternative<DocAutoListItem>(*p.parent()) && isFirst && isLast) needsTagBefore=FALSE;
1265+
if (isFirst && isLast) needsTagBefore=FALSE;
12661266

12671267
//printf(" needsTagBefore=%d\n",needsTagBefore);
12681268
// write the paragraph tag (if needed)
@@ -1307,7 +1307,7 @@ void HtmlDocVisitor::operator()(const DocPara &p)
13071307
}
13081308

13091309
//printf("endPara first=%d last=%d\n",isFirst,isLast);
1310-
if (!std::holds_alternative<DocAutoListItem>(*p.parent()) && isFirst && isLast) needsTagAfter=FALSE;
1310+
if (isFirst && isLast) needsTagAfter=FALSE;
13111311

13121312
//printf(" needsTagAfter=%d\n",needsTagAfter);
13131313
if (needsTagAfter) m_t << "</p>\n";
@@ -2301,7 +2301,7 @@ void HtmlDocVisitor::forceEndParagraph(const Node &n)
23012301
bool isLast = false;
23022302
getParagraphContext(*para,isFirst,isLast);
23032303
//printf("forceEnd first=%d last=%d styleOutsideParagraph=%d\n",isFirst,isLast,styleOutsideParagraph);
2304-
if (!std::holds_alternative<DocAutoListItem>(*para->parent()) && isFirst && isLast) return;
2304+
if (isFirst && isLast) return;
23052305
if (styleOutsideParagraph) return;
23062306

23072307
//printf("adding </p>\n");
@@ -2350,7 +2350,7 @@ void HtmlDocVisitor::forceStartParagraph(const Node &n)
23502350
bool isFirst = false;
23512351
bool isLast = false;
23522352
getParagraphContext(*para,isFirst,isLast);
2353-
if (!std::holds_alternative<DocAutoListItem>(*para->parent()) && isFirst && isLast) needsTag = false;
2353+
if (isFirst && isLast) needsTag = false;
23542354
//printf("forceStart first=%d last=%d needsTag=%d\n",isFirst,isLast,needsTag);
23552355

23562356
if (needsTag) m_t << "<p>";

templates/html/doxygen.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ p.startli, p.startdd {
7979
margin-top: 2px;
8080
}
8181

82-
li:only-child > p.startli {
83-
margin-top: 0px;
84-
margin-bottom: 0px;
85-
}
86-
8782
th p.starttd, th p.intertd, th p.endtd {
8883
font-size: 100%;
8984
font-weight: 700;

0 commit comments

Comments
 (0)