summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-08-10 12:33:14 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-08-10 12:33:14 (GMT)
commitfcb7d9fb380b714e1db9a279ceeba5af4cf59965 (patch)
treeb46f2a55c2a861ad13f8820c54b14d1e20103f58 /src/docparser.cpp
parentc82abe1f23ec55aa1d05f118c2bae3aac3b68296 (diff)
downloadDoxygen-fcb7d9fb380b714e1db9a279ceeba5af4cf59965.zip
Doxygen-fcb7d9fb380b714e1db9a279ceeba5af4cf59965.tar.gz
Doxygen-fcb7d9fb380b714e1db9a279ceeba5af4cf59965.tar.bz2
Correcting labels for citations
The labels for RTF and XML were incorrect due to the fact that the wrong branch was chosen in the code (the newAnchor was set for the results of the `\cite ` command as well). Small readability issue with XML (when there are a lot of citations).
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 7e050b3..0a9a10c 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1877,11 +1877,8 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Empty anchor label");
}
- if (newAnchor) // found <a name="label">
- {
- m_anchor = id;
- }
- else if (id.left(CiteConsts::anchorPrefix.length()) == CiteConsts::anchorPrefix)
+
+ if (id.left(CiteConsts::anchorPrefix.length()) == CiteConsts::anchorPrefix)
{
CiteInfo *cite = Doxygen::citeDict->find(id.mid(CiteConsts::anchorPrefix.length()));
if (cite)
@@ -1896,6 +1893,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
m_file = "invalid";
}
}
+ else if (newAnchor) // found <a name="label">
+ {
+ m_anchor = id;
+ }
else // found \anchor label
{
SectionInfo *sec = Doxygen::sectionDict->find(id);