summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-11-17 10:42:14 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-11-17 10:42:14 (GMT)
commit8ef2c893f372d44225f9536bac379387e8d2bc44 (patch)
treed5d7bfacd785f65c2d5e4382ab55d4d509b7d9e4 /src/commentscan.l
parenta7803b58cf4359b0dbf44e3c4346283cc4242b6e (diff)
downloadDoxygen-8ef2c893f372d44225f9536bac379387e8d2bc44.zip
Doxygen-8ef2c893f372d44225f9536bac379387e8d2bc44.tar.gz
Doxygen-8ef2c893f372d44225f9536bac379387e8d2bc44.tar.bz2
Extending \cite command with '-' and '?' characters.
In the `\cite` label some extra characters are enabled, '-' and '?', as the '--' and '---' have been converted beforehand they have to be converted back and the corresponding labels also have to between double quotes (which are striped away).
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index e317a86..3be770f 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -696,7 +696,13 @@ static void addSection()
static void addCite()
{
- Doxygen::citeDict->insert(yytext);
+ QCString name=yytext;
+ if (yytext[0] =='"')
+ {
+ name=yytext+1;
+ name=name.left(yyleng-2);
+ }
+ Doxygen::citeDict->insert(name.data());
}
//-----------------------------------------------------------------------------
@@ -943,9 +949,9 @@ FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+@&#]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"")
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
-CITESCHAR [a-z_A-Z0-9\x80-\xFF]
-CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]*
-CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*
+CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
+CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]*
+CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID})
TMPLSPEC "<"{BN}*[^>]+{BN}*">"