diff options
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r-- | src/commentcnv.l | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l index f3367a4..ba2e5ec 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -546,7 +546,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z } } <CComment>\n { /* new line in comment */ - copyToOutput(yyscanner,yytext,(int)yyleng); + copyToOutput(yyscanner,yytext,(int)yyleng); /* in case of Fortran always end of comment */ if (yyextra->lang==SrcLangExt_Fortran) { @@ -554,16 +554,20 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z } } <CComment>"/"+"*" { /* nested C comment */ - if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl)) + if (yyextra->lang==SrcLangExt_Python || + yyextra->lang==SrcLangExt_Tcl || + yyextra->lang==SrcLangExt_Markdown) { REJECT; } yyextra->nestingCount++; yyextra->commentStack.push(new CommentCtx(yyextra->lineNr)); - copyToOutput(yyscanner,yytext,(int)yyleng); + copyToOutput(yyscanner,yytext,(int)yyleng); } <CComment>"*"+"/" { /* end of C comment */ - if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl)) + if (yyextra->lang==SrcLangExt_Python || + yyextra->lang==SrcLangExt_Tcl || + yyextra->lang==SrcLangExt_Markdown) { REJECT; } |