@@ -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>" ;
0 commit comments