summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-10 18:59:13 (GMT)
committerGitHub <noreply@github.com>2019-12-10 18:59:13 (GMT)
commit11c53bc7bd077d021b965f6272ff8fdb074459c4 (patch)
tree4b41d409874c98d01c112dab448a4699a89da6a7 /src
parent7f88821f11f1c64bed3fd76cbdd28552ace54437 (diff)
parent72eed17195c6650d503c191fb8e3ed54d3426df4 (diff)
downloadDoxygen-11c53bc7bd077d021b965f6272ff8fdb074459c4.zip
Doxygen-11c53bc7bd077d021b965f6272ff8fdb074459c4.tar.gz
Doxygen-11c53bc7bd077d021b965f6272ff8fdb074459c4.tar.bz2
Merge pull request #7431 from albert-github/feature/bug_email
Email address seen as code starter
Diffstat (limited to 'src')
-rw-r--r--src/commentcnv.l8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 13a21c3..66aada1 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -119,6 +119,8 @@ static void replaceComment(yyscan_t yyscanner,int offset);
%}
+MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
+
%option noyywrap
%x Scan
@@ -335,6 +337,10 @@ static void replaceComment(yyscan_t yyscanner,int offset);
yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
}
}
+<CComment,ReadLine>{MAILADR} |
+<CComment,ReadLine>"<"{MAILADR}">" { // Mail address, to prevent seeing e.g x@code-factory.org as start of a code block
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ }
<CComment>"{@code"/[ \t\n] {
copyToOutput(yyscanner,"@code",5);
yyextra->lastCommentContext = YY_START;
@@ -519,7 +525,7 @@ static void replaceComment(yyscan_t yyscanner,int offset);
copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>[^\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
+<CComment>[^ <\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+[^*/\\@\n{\"]* { /* stars without slashes */