summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-11-06 13:36:37 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-11-06 13:36:37 (GMT)
commit9664e0b46ba516069d5fd740aac4ef4eb5f874cf (patch)
treeedba83155692849a0f16c4e7f6a6fd44cda3bc1d /src/commentscan.l
parent0a1a216ceed4be17ab3bf2a80be3be1bae21efeb (diff)
downloadDoxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.zip
Doxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.tar.gz
Doxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.tar.bz2
Better warning in case of `@form`
When having a problem like: ``` /** \file */ /** * The fie * * @form: the new format * @content: the content of the form * * Sets @form content to be @content. * * \f$ \alpha \f$ \f[ \beta \f] */ void fie(char *form, char *content); ``` we get warnings like: ``` .../aa.h:5: warning: Wrong formula id -1 .../aa.h:6: warning: Found unknown command '\content' .../aa.h:8: warning: Wrong formula id -1 .../aa.h:8: warning: Found unknown command '\content' ``` The `@form:` is in RST analogue to the doxygen `@param form` but not understood by doxygen. The result is that it is seen as an formula as doxygen translates the formula commands to `\form`. For `@content` is handled properly as this is not a doxygen command. In this patch a more unique name is chosen so these type of conflicts don't appear (that easy). The resulting, better, warnings are now: ``` .../aa.h:5: warning: Found unknown command '\form' .../aa.h:6: warning: Found unknown command '\content' .../aa.h:8: warning: Found unknown command '\form' .../aa.h:8: warning: Found unknown command '\content' ```
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index 6e7d373..0494d88 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -622,12 +622,12 @@ static QCString addFormula()
f = new Formula(fText);
Doxygen::formulaList->append(f);
Doxygen::formulaDict->insert(fText,f);
- formLabel.sprintf("\\form#%d",f->getId());
+ formLabel.sprintf("\\_fakeform#%d",f->getId());
Doxygen::formulaNameDict->insert(formLabel,f);
}
else
{
- formLabel.sprintf("\\form#%d",f->getId());
+ formLabel.sprintf("\\_fakeform#%d",f->getId());
}
int i;
for (i=0;i<formulaNewLines;i++) formLabel+="@_fakenl"; // add fake newlines to