diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-02-17 20:09:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-02-17 20:09:36 (GMT) |
commit | b4bf112632354be795da81a9c0660eebf2ec81e5 (patch) | |
tree | 177e200b3ac93983f2f4ff7da48189792cc1092b /src/docparser.cpp | |
parent | bf0e769bd9771d0a930261f570bafb1a828692aa (diff) | |
download | Doxygen-b4bf112632354be795da81a9c0660eebf2ec81e5.zip Doxygen-b4bf112632354be795da81a9c0660eebf2ec81e5.tar.gz Doxygen-b4bf112632354be795da81a9c0660eebf2ec81e5.tar.bz2 |
a named anchor does not need custom attributes and minor other corrections.
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 47c0c8c..aff7411 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1042,7 +1042,7 @@ static int handleAHref(DocNode *parent,QList<DocNode> &children,const HtmlAttrib // and remove the href attribute bool result = attrList.remove(index); ASSERT(result); - DocAnchor *anc = new DocAnchor(parent,opt->value,TRUE,attrList); + DocAnchor *anc = new DocAnchor(parent,opt->value,TRUE); children.append(anc); break; // stop looking for other tag attribs } @@ -1934,7 +1934,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word, //--------------------------------------------------------------------------- -void DocAnchor::docAnchorInit(DocNode *parent,const QCString &id,bool newAnchor) +DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) { m_parent = parent; if (id.isEmpty()) @@ -6866,9 +6866,10 @@ endparagraph: DocNode *n = g_nodeStack.pop(); ASSERT(n==this); DBG(("DocPara::parse() end retval=%x\n",retval)); - if (!g_token->endTag && retval == TK_NEWPARA && g_token->name.lower() == "p") + if (!g_token->endTag && n->kind()==DocNode::Kind_Para && + retval==TK_NEWPARA && g_token->name.lower() == "p") { - ((DocPara *)n) -> m_attribs = g_token->attribs; + ((DocPara *)n)->setAttribs(g_token->attribs); } INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM || retval==TK_ENDLIST || retval>RetVal_OK @@ -7137,7 +7138,7 @@ void DocRoot::parse() DocPara *par = new DocPara(this); if (isFirst) { par->markFirst(); isFirst=FALSE; } retval=par->parse(); - if (!par->isEmpty() || par->attribs().count()) + if (!par->isEmpty() || par->attribs().count()>0) { m_children.append(par); lastPar=par; |