Skip to content

Commit 6533fec

Browse files
committed
Merge branch 'albert-github-feature/issue_11828'
2 parents 82da90c + 3447a2e commit 6533fec

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/docnode.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,6 +3031,7 @@ Token DocAutoList::parse()
30313031
);
30323032

30333033
parser()->tokenizer.endAutoList();
3034+
30343035
AUTO_TRACE_EXIT("retval={}",retval.to_string());
30353036
return retval;
30363037
}

src/htmldocvisitor.cpp

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

13321332
//printf(" needsTagBefore=%d\n",needsTagBefore);
13331333
// write the paragraph tag (if needed)
@@ -1372,7 +1372,7 @@ void HtmlDocVisitor::operator()(const DocPara &p)
13721372
}
13731373

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

13771377
//printf(" needsTagAfter=%d\n",needsTagAfter);
13781378
if (needsTagAfter) m_t << "</p>\n";
@@ -2368,7 +2368,7 @@ void HtmlDocVisitor::forceEndParagraph(const Node &n)
23682368
bool isLast = false;
23692369
getParagraphContext(*para,isFirst,isLast);
23702370
//printf("forceEnd first=%d last=%d styleOutsideParagraph=%d\n",isFirst,isLast,styleOutsideParagraph);
2371-
if (isFirst && isLast) return;
2371+
if (!std::holds_alternative<DocAutoListItem>(*para->parent()) && isFirst && isLast) return;
23722372
if (styleOutsideParagraph) return;
23732373

23742374
//printf("adding </p>\n");
@@ -2417,7 +2417,7 @@ void HtmlDocVisitor::forceStartParagraph(const Node &n)
24172417
bool isFirst = false;
24182418
bool isLast = false;
24192419
getParagraphContext(*para,isFirst,isLast);
2420-
if (isFirst && isLast) needsTag = false;
2420+
if (!std::holds_alternative<DocAutoListItem>(*para->parent()) && isFirst && isLast) needsTag = false;
24212421
//printf("forceStart first=%d last=%d needsTag=%d\n",isFirst,isLast,needsTag);
24222422

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

templates/html/doxygen.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ 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+
8287
th p.starttd, th p.intertd, th p.endtd {
8388
font-size: 100%;
8489
font-weight: 700;

0 commit comments

Comments
 (0)