Skip to content

Commit db8c371

Browse files
committed
Add support for multiple <summary> sections inside <details>
1 parent 7fed88a commit db8c371

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/docnode.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4619,7 +4619,14 @@ int DocPara::handleHtmlStartTag(DocNodeVariant *thisVariant,const QCString &tagN
46194619
DocHtmlDetails *d = std::get_if<DocHtmlDetails>(n);
46204620
if (d)
46214621
{
4622-
d->parseSummary(n,parser()->context.token->attribs);
4622+
if (!d->summary()) // details section does not have a summary yet
4623+
{
4624+
d->parseSummary(n,parser()->context.token->attribs);
4625+
}
4626+
else
4627+
{
4628+
retval = TK_NEWPARA;
4629+
}
46234630
}
46244631
}
46254632
}
@@ -5011,6 +5018,7 @@ int DocPara::handleHtmlEndTag(DocNodeVariant *thisVariant,const QCString &tagNam
50115018
//children().push_back(std::make_unique<DocStyleChange>(this,parser()->context.nodeStack.size(),DocStyleChange::Bold,FALSE));
50125019
break;
50135020
case XML_SUMMARY:
5021+
retval=TK_NEWPARA;
50145022
break;
50155023
case XML_REMARKS:
50165024
case XML_PARA:

src/htmldocvisitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ void HtmlDocVisitor::operator()(const DocPara &p)
13331333
if (strlen(contexts[t]))
13341334
m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p.attribs()) << ">";
13351335
else
1336-
m_t << "<p " << htmlAttribsToString(p.attribs()) << ">";
1336+
m_t << "<p" << htmlAttribsToString(p.attribs()) << ">";
13371337
}
13381338

13391339
visitChildren(p);

0 commit comments

Comments
 (0)