summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-02-12 20:39:00 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-02-12 20:39:00 (GMT)
commita9b8e48237d4094095b91031ac7c9fb0f4cc028e (patch)
tree498c4173ac1530bb0ab661a222ddc2906f564944 /src/docparser.cpp
parent3ced61065d252f4f8a3cf5f310f30094d91ac83c (diff)
downloadDoxygen-a9b8e48237d4094095b91031ac7c9fb0f4cc028e.zip
Doxygen-a9b8e48237d4094095b91031ac7c9fb0f4cc028e.tar.gz
Doxygen-a9b8e48237d4094095b91031ac7c9fb0f4cc028e.tar.bz2
Release-1.3.6
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 80bea8d..760e1b5 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -3316,7 +3316,8 @@ void DocPara::handleImage(const QString &cmdName)
return;
}
doctokenizerYYsetStatePara();
- DocImage *img = new DocImage(this,findAndCopyImage(g_token->name,t),t);
+ HtmlAttribList attrList;
+ DocImage *img = new DocImage(this,attrList,findAndCopyImage(g_token->name,t),t);
m_children.append(img);
img->parse();
}
@@ -3982,7 +3983,8 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
{
HtmlAttribListIterator li(tagHtmlAttribs);
HtmlAttrib *opt;
- for (li.toFirst();(opt=li.current());++li)
+ int index=0;
+ for (li.toFirst();(opt=li.current());++li,++index)
{
if (opt->name=="name") // <a name=label> tag
{
@@ -4002,7 +4004,8 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
// copy attributes
HtmlAttribList attrList = tagHtmlAttribs;
// and remove the href attribute
- attrList.remove(opt);
+ bool result = attrList.remove(index);
+ ASSERT(result);
DocHRef *href = new DocHRef(this,attrList,opt->value);
m_children.append(href);
g_insideHtmlLink=TRUE;
@@ -4039,12 +4042,18 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
HtmlAttribListIterator li(tagHtmlAttribs);
HtmlAttrib *opt;
bool found=FALSE;
- for (li.toFirst();(opt=li.current());++li)
+ int index=0;
+ for (li.toFirst();(opt=li.current());++li,++index)
{
//printf("option name=%s value=%s\n",opt->name.data(),opt->value.data());
if (opt->name=="src" && !opt->value.isEmpty())
{
- DocImage *img = new DocImage(this,opt->value,DocImage::Html);
+ // copy attributes
+ HtmlAttribList attrList = tagHtmlAttribs;
+ // and remove the href attribute
+ bool result = attrList.remove(index);
+ ASSERT(result);
+ DocImage *img = new DocImage(this,attrList,opt->value,DocImage::Html);
m_children.append(img);
found = TRUE;
}