Skip to content

Commit

Permalink
Bug 741778 - \cite confused by labels ending with a dot (improved war…
Browse files Browse the repository at this point in the history
…ning message)
  • Loading branch information
Dimitri van Heesch committed Dec 22, 2014
1 parent 045cc72 commit 78fd02d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/docparser.cpp
Expand Up @@ -2576,6 +2576,7 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
CiteInfo *cite = Doxygen::citeDict->find(target);
//printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?cite->text.data():"<null>",numBibFiles);
if (numBibFiles>0 && cite && !cite->text.isEmpty()) // ref to citation
{
m_text = cite->text;
Expand All @@ -2587,8 +2588,20 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
return;
}
m_text = target;
warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to `%s' for \\cite command",
qPrint(target));
if (numBibFiles==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"\\cite command found but no bib files specified via CITE_BIB_FILES!");
}
else if (cite==0)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to `%s' for \\cite command",
qPrint(target));
}
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"\\cite command to '%s' does not have an associated number",
qPrint(target));
}
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 78fd02d

Please sign in to comment.