summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-02-17 19:51:57 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-02-17 19:51:57 (GMT)
commitbf0e769bd9771d0a930261f570bafb1a828692aa (patch)
tree943bc27c51355e4f131099a19722a00be03f660a /src/docparser.cpp
parentaf363c50c64268f473aa5b595a0379f8590c4759 (diff)
parent64ac36480f407145d8fe1e96ea4cf8f7e30285d5 (diff)
downloadDoxygen-bf0e769bd9771d0a930261f570bafb1a828692aa.zip
Doxygen-bf0e769bd9771d0a930261f570bafb1a828692aa.tar.gz
Doxygen-bf0e769bd9771d0a930261f570bafb1a828692aa.tar.bz2
Merge branch 'feature/bug_136299' of https://github.com/albert-github/doxygen into albert-github-feature/bug_136299
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index bcf4bac..47c0c8c 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1037,7 +1037,12 @@ static int handleAHref(DocNode *parent,QList<DocNode> &children,const HtmlAttrib
{
if (!opt->value.isEmpty())
{
- DocAnchor *anc = new DocAnchor(parent,opt->value,TRUE);
+ // copy attributes
+ HtmlAttribList attrList = tagHtmlAttribs;
+ // and remove the href attribute
+ bool result = attrList.remove(index);
+ ASSERT(result);
+ DocAnchor *anc = new DocAnchor(parent,opt->value,TRUE,attrList);
children.append(anc);
break; // stop looking for other tag attribs
}
@@ -1929,7 +1934,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
//---------------------------------------------------------------------------
-DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
+void DocAnchor::docAnchorInit(DocNode *parent,const QCString &id,bool newAnchor)
{
m_parent = parent;
if (id.isEmpty())
@@ -3073,7 +3078,7 @@ int DocHtmlHeader::parse()
}
else if (tagId==HTML_BR)
{
- DocLineBreak *lb = new DocLineBreak(this);
+ DocLineBreak *lb = new DocLineBreak(this,g_token->attribs);
m_children.append(lb);
}
else
@@ -6080,13 +6085,13 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
break;
case HTML_BR:
{
- DocLineBreak *lb = new DocLineBreak(this);
+ DocLineBreak *lb = new DocLineBreak(this,tagHtmlAttribs);
m_children.append(lb);
}
break;
case HTML_HR:
{
- DocHorRuler *hr = new DocHorRuler(this);
+ DocHorRuler *hr = new DocHorRuler(this,tagHtmlAttribs);
m_children.append(hr);
}
break;
@@ -6861,6 +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")
+ {
+ ((DocPara *)n) -> m_attribs = g_token->attribs;
+ }
INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
retval==TK_ENDLIST || retval>RetVal_OK
);
@@ -7128,7 +7137,7 @@ void DocRoot::parse()
DocPara *par = new DocPara(this);
if (isFirst) { par->markFirst(); isFirst=FALSE; }
retval=par->parse();
- if (!par->isEmpty())
+ if (!par->isEmpty() || par->attribs().count())
{
m_children.append(par);
lastPar=par;