diff options
author | albert-github <albert.tests@gmail.com> | 2018-08-10 12:33:14 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-08-10 12:33:14 (GMT) |
commit | fcb7d9fb380b714e1db9a279ceeba5af4cf59965 (patch) | |
tree | b46f2a55c2a861ad13f8820c54b14d1e20103f58 /src | |
parent | c82abe1f23ec55aa1d05f118c2bae3aac3b68296 (diff) | |
download | Doxygen-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')
-rw-r--r-- | src/docparser.cpp | 11 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 2 |
2 files changed, 7 insertions, 6 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); diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 93765b1..adb2e33 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -488,7 +488,7 @@ void XmlDocVisitor::visitPre(DocPara *) void XmlDocVisitor::visitPost(DocPara *) { if (m_hide) return; - m_t << "</para>"; + m_t << "</para>" << endl; } void XmlDocVisitor::visitPre(DocRoot *) |