Skip to content

Commit 3447a2e

Browse files
committed
PR doxygen#11862 replace p.startsingle by li:only-child > p.startli
1 parent e49d778 commit 3447a2e

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

src/docnode.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3017,7 +3017,6 @@ Token DocAutoList::parse()
30173017

30183018
children().append<DocAutoListItem>(parser(),thisVariant(),m_indent,num++);
30193019
retval = children().get_last<DocAutoListItem>()->parse();
3020-
m_singleParagraph = m_singleParagraph && children().get_last<DocAutoListItem>()->children().size()<=1 ;
30213020
//printf("DocAutoList::parse(): retval=0x%x parser()->context.token->indent=%d m_indent=%d "
30223021
// "m_isEnumList=%d parser()->context.token->isEnumList=%d parser()->context.token->name=%s\n",
30233022
// retval,parser()->context.token->indent,m_indent,m_isEnumList,parser()->context.token->isEnumList,

src/docnode.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,13 @@ class DocAutoList : public DocCompoundNode
580580
bool isEnumList() const { return m_isEnumList; }
581581
int indent() const { return m_indent; }
582582
bool isCheckedList() const { return m_isCheckedList; }
583-
bool isSingleParagraph() const { return m_singleParagraph; }
584583
int depth() const { return m_depth; }
585584
Token parse();
586585

587586
private:
588587
int m_indent = 0;
589588
bool m_isEnumList = false;
590589
bool m_isCheckedList = false;
591-
bool m_singleParagraph = true;
592590
int m_depth = 0;
593591
};
594592

src/htmldocvisitor.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ enum class contexts_t
5353
ENDTD, // 6
5454
INTERLI, // 7
5555
INTERDD, // 8
56-
INTERTD, // 9
57-
STARTLISINGLE // 10
56+
INTERTD // 9
5857
};
5958

6059
static constexpr const char *contexts(contexts_t type)
@@ -63,7 +62,6 @@ static constexpr const char *contexts(contexts_t type)
6362
{
6463
case contexts_t::NONE: return nullptr;
6564
case contexts_t::STARTLI: return "startli";
66-
case contexts_t::STARTLISINGLE: return "startlisingle";
6765
case contexts_t::STARTDD: return "startdd";
6866
case contexts_t::ENDLI: return "endli";
6967
case contexts_t::ENDDD: return "enddd";
@@ -1173,14 +1171,7 @@ static contexts_t getParagraphContext(const DocPara &p,bool &isFirst,bool &isLas
11731171
{
11741172
isFirst=isFirstChildNode(docAutoListItem,p);
11751173
isLast =isLastChildNode (docAutoListItem,p);
1176-
if (std::get_if<DocAutoList>(docAutoListItem->parent())->isSingleParagraph())
1177-
{
1178-
t=contexts_t::STARTLISINGLE; // not used
1179-
}
1180-
else
1181-
{
1182-
t=contexts_t::STARTLI; // not used
1183-
}
1174+
t=contexts_t::STARTLI; // not used
11841175
return t;
11851176
}
11861177
const auto docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());

templates/html/doxygen.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ p.startli, p.startdd {
7979
margin-top: 2px;
8080
}
8181

82-
p.startlisingle {
82+
li:only-child > p.startli {
8383
margin-top: 0px;
8484
margin-bottom: 0px;
8585
}

0 commit comments

Comments
 (0)